comparison xsls/ga.xsls @ 1282:f717975834cf

Replace google analytics with google tag manager.
author Sergey Budnevitch <sb@waeme.net>
date Wed, 10 Sep 2014 12:56:03 +0400
parents 10e622e0bfc8
children 8b26399868ed
comparison
equal deleted inserted replaced
1281:7a307c6bcf07 1282:f717975834cf
4 4
5 X:stylesheet { 5 X:stylesheet {
6 6
7 X:template ga () { 7 X:template ga () {
8 8
9 <script type="text/javascript"> 9 <script>
10 10 (function(w, d, s, l, i) \{
11 var _gaq = _gaq || []; 11 w[l] = w[l] || [];
12 _gaq.push(['_setAccount', 'UA-27974099-2']); 12 w[l].push(\{
13 _gaq.push(['_setDomainName', 'nginx.org']); 13 'gtm.start': new Date().getTime(),
14 _gaq.push(['_trackPageview']); 14 event: 'gtm.js'
15 15 \});
16 (function() \{ 16 var f = d.getElementsByTagName(s)[0],
17 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 17 j = d.createElement(s),
18 ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; 18 dl = l != 'dataLayer' ? '&amp;l=' + l : '';
19 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 19 j.async = true;
20 \})(); 20 j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl;
21 21 f.parentNode.insertBefore(j, f);
22 \})(window, document, 'script', 'dataLayer', 'GTM-WBXGM3');
22 </script> 23 </script>
23 24
24 } 25 }
25 26
26 } 27 }