added gtag
This commit is contained in:
parent
caf06858f7
commit
da3db4337f
@ -291,22 +291,15 @@ Copyright:
|
|||||||
|
|
||||||
#define SCRIPTS_HTML \
|
#define SCRIPTS_HTML \
|
||||||
HTML_TAG_OPEN_CONTENT("script", "src=\"/main.js\"", "") \
|
HTML_TAG_OPEN_CONTENT("script", "src=\"/main.js\"", "") \
|
||||||
|
HTML_TAG_OPEN_CONTENT("script", "async src=\"/main.js\"", "") \
|
||||||
HTML_TAG_OPEN("script", "type=\"text/javascript\"") \
|
HTML_TAG_OPEN("script", "type=\"text/javascript\"") \
|
||||||
HTML_RAWTEXT("var _gaq = _gaq || [];") \
|
HTML_RAWTEXT("window.dataLayer = window.dataLayer || [];") \
|
||||||
HTML_NEWLINE() \
|
HTML_NEWLINE() \
|
||||||
HTML_RAWTEXT("_gaq.push(['_setAccount', 'UA-XXXXX-X']);") \
|
HTML_RAWTEXT("function gtag(){dataLayer.push(arguments);}") \
|
||||||
HTML_NEWLINE() \
|
HTML_NEWLINE() \
|
||||||
HTML_RAWTEXT("_gaq.push(['_trackPageview']);") \
|
HTML_RAWTEXT("gtag('js', new Date());") \
|
||||||
HTML_NEWLINE() \
|
HTML_NEWLINE() \
|
||||||
HTML_RAWTEXT("(function() {") \
|
HTML_RAWTEXT("gtag('config', 'G-C4VP1TE4JZ');") \
|
||||||
HTML_NEWLINE() \
|
|
||||||
HTML_RAWTEXT("var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;") \
|
|
||||||
HTML_NEWLINE() \
|
|
||||||
HTML_RAWTEXT("ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';") \
|
|
||||||
HTML_NEWLINE() \
|
|
||||||
HTML_RAWTEXT("var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);") \
|
|
||||||
HTML_NEWLINE() \
|
|
||||||
HTML_RAWTEXT("})();") \
|
|
||||||
HTML_NEWLINE() \
|
HTML_NEWLINE() \
|
||||||
HTML_TAG_CLOSE("script") \
|
HTML_TAG_CLOSE("script") \
|
||||||
HTML_NEWLINE()
|
HTML_NEWLINE()
|
||||||
|
Loading…
Reference in New Issue
Block a user