Last active
August 21, 2019 03:39
-
-
Save antlis/af490c77864dfca8ad6e602abb107df1 to your computer and use it in GitHub Desktop.
Google analytics pug mixin, HTML5 boilerplate like
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mixin ga(id) | |
//- Pass your ga id, as attribute, eg. +ga('yourid12345') | |
script. | |
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date; | |
ga('create', '!{id}', 'auto'); ga('set','transport','beacon'); ga('send', 'pageview') | |
script(src='https://www.google-analytics.com/analytics.js') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment