Skip to content

Instantly share code, notes, and snippets.

@girlcheese
Created August 21, 2014 13:43
Show Gist options
  • Save girlcheese/563f8f3583fa5017ca37 to your computer and use it in GitHub Desktop.
Save girlcheese/563f8f3583fa5017ca37 to your computer and use it in GitHub Desktop.
Getting the TrackingId on a page.
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);
});
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