Olivenbaum does not currently provide support for this item.

10 comments found.

First, this little jQuery plugins works great! Thanks for that!

But now, I have a question: What if I want to use the anonymous tracking code? My current code looks like this:

var _gaq=_gaq||[]; _gaq.push(['_setAccount','UA-XXXX-X']); _gaq.push(['_gat._anonymizeIp']); _gaq.push(['_trackPageview']); (function(){ var ga=document.createElement('script'); ga.type='text/javascript'; ga.async=true; ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js'; var s=document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga,s); })();

How do I achieve this with your plugin?

Greetings JonasDoebertin

To use anonymous tracking code you have to write $.ga( ['_gat._anonymizeIp'] );

after your Account setup (the line with UA-XXXX-XX).

I hope this is what you wanted to know :)

Yeah, I came up with this on my own, but the ploblem with anonymous tracking is, that the ['_gat._anonymizeIp'] has to be pushed BEFORE the ['_trackPageview'] gets pushed.

So if I use your suggestion, the anonymization will not take effect.

Any other solutions?

Greets JonasDoebertin

Ah I see. Add it before account setup :)

Check this out to test your tracking code: Google Analytics Debugger


I’d like to track anchor links so when my users scroll to/past an anchor, it’s tracked.

You’ll see on this page that the sidebar menu is updated as the user scrolls. I’d like to send an event to Analytics each time this happens: http://www.campaignmonitor.com/api/campaigns/#campaign_unsubscribeslist

Is this possible with your code? Thanks, Mark.

Hey Mark,

yes, this is possible. You can either put $.ga(‘_trackEvent’, ...) in your scroll callback or trigger the tracking code at any event.

When you have purchased the script contact me through my profile and I will help you with the implementation :)

Regards, Tim

Hello Olivenbaum,

we are getting this following message on Firefox 5 with the FireBug extension:

b.ajax({type: “GET”, url: (“https:” == document.location.protocol ? “https://ssl” : “http://www”) + ”.google-analytics.com/ga.js”, cache: !0, dataType: “script”, data: null}) is undefined

It mentions the error occuring in jquery.ga.min.js.

We added jquery-1.4.2.min.js, jquery.ga.min.js and jquery.form-tracker.min.js. Then we added


We followed the instructions but still got the message above.

Regards, Team Supercomm

Please use the most recent jQuery version :)

If you still get this error after upgrading jQuery please contact me.

That was it, we upgraded the jQuery version and it’s working now. Thank you.


Have uploaded your js script, and added the script above teh <head> as outlined in readme file. However, Google does not seem to being picking up tracking as events. I am using “onClick=”_gaq.push([‘_trackEvent’, ‘Mobile Outbound Links’, ‘Clicked’, ‘Reese Facebook’]);” on the a href . The page itself is being recognized within google analytics – but the events are not being tracked. What am I doing wrong? Thanks

This hasn’t been updated in over a year, does it work with the latest jQuery and GA code?

I’m still using it regularely, but latest jQuery version I tested was 1.8.3, so for 1.9 and above (which likely make problems with older plugins) I cannot answer this.

I have another question, I just thought about tracking when a page gets printed and asked myself it his would be possible with this skript, also 404 tracking would be interesting =)...any ideas?

I want to track outbound click from my website. Will this let me me do that. how will i setup the links url or href to check this

Does this even work since it hasn’t been touched since 2011? Let mekmow.