Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created August 14, 2013 09:48
Show Gist options
  • Save emilisto/6229538 to your computer and use it in GitHub Desktop.
Save emilisto/6229538 to your computer and use it in GitHub Desktop.
// We assume that this is running in an iframe which loads a page from a domain
// that is specific to where your widget is served from. This means that for
// browsers that support 3rd party cookies in iframes, the cookie will be set
// on this domain, and for those who don't, localStorage will be used instead.
ga('create', 'UA-XXXX-Y', {
'storage': 'none',
'clientId', getPersistentVisitorId()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment