Skip to content

Instantly share code, notes, and snippets.

@marekcech
Last active November 9, 2017 14:15
Show Gist options
  • Save marekcech/400e86d6269939b48afc34d7e8ad6822 to your computer and use it in GitHub Desktop.
Save marekcech/400e86d6269939b48afc34d7e8ad6822 to your computer and use it in GitHub Desktop.
gtag.js new standard in Google measurement
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment