Skip to content

Instantly share code, notes, and snippets.

@rbg246
Created June 10, 2015 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbg246/a2a9f0e3f045e911c283 to your computer and use it in GitHub Desktop.
Save rbg246/a2a9f0e3f045e911c283 to your computer and use it in GitHub Desktop.
Universal Analytics - Check IDs loaded on webpage
function checkAnalytics () {
var ids = ga.getAll();
var len = ids.length;
console.log('Universal Analytics');
console.log('ids', ids);
console.log('=======================================================');
console.log('Number of Universal Analytics IDs found : ' + ids.length);
console.log('=======================================================');
console.log('Universal Analytics IDs');
console.log('=======================================================');
while (len--) {
console.log(ids[len].get('trackingId'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment