Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // #1 - setDomain to '.domain.tld' in all cases.
- var D = '.' + document.location.hostname.split('.').slice(-2).join('.');
- _gaq.push([ '_setDomainName', D ]);
- // #2 - async wrapper functions for code linked against pageTracker, etc
- // Update this for the appropriate tracker name in the _gaq.push() calls
- var i, fakeTracker = {
- pageTracker: {
- _trackPageview: function(o){ return _gaq.push([ 'tracker._trackPageview', o ]); },
- _trackEvent: function(c, a, l, v){ return _gaq.push([ 'tracker._trackEvent', c, a, l, v ]); },
- _link: function(u, h){ return _gaq.push([ '_link', u, h ]); }
- }
- }, _gaq = window._gaq = window._gaq || [];
- for(i in fakeTracker) window[i] = fakeTracker[i];
Add Comment
Please, Sign In to add comment