Created
August 21, 2014 13:43
-
-
Save girlcheese/563f8f3583fa5017ca37 to your computer and use it in GitHub Desktop.
Getting the TrackingId on a page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ga(function() { | |
var trackers = ga.getAll(), ret = []; | |
for (var i=0; i<trackers.length; ++i) { | |
var tracker = trackers[i]; | |
ret.push(tracker.get('trackingId')); | |
} | |
console.log(ret); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ga(function(tracker){ | |
console.log( tracker.get('trackingId')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment