It's not Java either.
Also, saying "shows an error" is not enough: quote the error, because 100% of the time what the error message says will be more informative.
Further, since it's possible that no-one here has your "GetClass" function, or your ISC_VISITOR, nor a definition of the object which that function returns, our entire understanding of what you posted is: "If there is an 'action' field submitted in the request, do one thing if it's equal to 'tracking_script' and some other thing if it's equal to 'track_visitor'." Which isn't enough to go on in the absence of any other information.
I'll move this to the coding forum, pending this turning out to be a JavaScript error after all.