The web application I built throws errors when presented with unknown query string variables, so I'd like to manually set the tracking values manually, much like:


But by setting the values directly, not the variables to look for the values in.

Is this possible?

4 Answers 4


Perhaps you could play around with other options such as _setAllowAnchor() and change your URLs to use hashes (for GA) and query vars for your web app. Although, to be honest, probably not the best idea in the world to throw errors if you have unknown variables query strings, it should just ignore them instead.


No, it is not possible. In order for Google Adsense to recognize the data, it needs to be in the URL as a GET variable, otherwise it doesn't know where to look.


You can pass custom values onto the GA tracking using

_gaq.push(['_setCampSourceKey', 'source']);

and the equivalent for medium, campaign, etc.



Check out this: http://blog.intlock.com/_setcampvalues-for-google-analytics/

Here the utmz cookie is faked with Javascript, hence you can problematically specify the source, medium, ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.