Skip to content

Instantly share code, notes, and snippets.

Last active August 26, 2016 06:57
What would you like to do?
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', 'UA-XXXXXX-XX', 'auto');
// get client id
ga(function(tracker) {
var clientId = tracker.get('clientId');
ga('set', 'dimension1', clientId);
// get timestamp
var timeStamp = Math.floor( (new Date).getTime()/1000 );
ga('set', 'dimension2', timeStamp);
ga('send', 'pageview');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment