equal
deleted
inserted
replaced
29 <![endif]--> |
29 <![endif]--> |
30 <tal:var content="structure provider:pagelet" /> |
30 <tal:var content="structure provider:pagelet" /> |
31 </div> |
31 </div> |
32 <!-- end content --> |
32 <!-- end content --> |
33 |
33 |
34 <tal:if condition="config/google_analytics_key"> |
34 <!-- Google Analytics --> |
35 <!-- Google Analytics --> |
35 <tal:if define="ga_key config/google_analytics_key" |
36 <script type="text/javascript" tal:content="python:''' |
36 condition="ga_key"> |
37 |
37 <script async |
38 var _gaq = _gaq || []; |
38 tal:attributes="src string:https://www.googletagmanager.com/gtag/js?id=${ga_key}"></script> |
39 _gaq.push(['_setAccount', '%(key)s']); |
39 <script tal:content="python:''' |
40 _gaq.push(['_trackPageview']); |
40 window.dataLayer = window.dataLayer || []; |
41 |
41 function gtag() { |
42 (function() { |
42 dataLayer.push(arguments); |
43 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
43 } |
44 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
44 gtag('js', new Date()); |
45 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
45 gtag('config', '%(key)s'); |
46 })(); |
46 ''' % {'key': ga_key}"></script> |
47 |
|
48 ''' % {'key': config.google_analytics_key}"></script> |
|
49 <!-- end Google Analytics --> |
|
50 </tal:if> |
47 </tal:if> |
|
48 <!-- end Google Analytics --> |
51 </body> |
49 </body> |
52 </html> |
50 </html> |