167 <!-- end content --> |
167 <!-- end content --> |
168 |
168 |
169 </div> |
169 </div> |
170 <!-- end main panel --> |
170 <!-- end main panel --> |
171 |
171 |
172 <tal:if condition="config/google_analytics_key"> |
172 <!-- Google Analytics --> |
173 <!-- Google Analytics --> |
173 <tal:if define="ga_key config/google_analytics_key" |
174 <script type="text/javascript" tal:content="python:''' |
174 condition="ga_key"> |
175 |
175 <script async |
176 var _gaq = _gaq || []; |
176 tal:attributes="src string:https://www.googletagmanager.com/gtag/js?id=${ga_key}"></script> |
177 _gaq.push(['_setAccount', '%(key)s']); |
177 <script tal:content="python:''' |
178 _gaq.push(['_trackPageview']); |
178 window.dataLayer = window.dataLayer || []; |
179 |
179 function gtag() { |
180 (function() { |
180 dataLayer.push(arguments); |
181 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
181 } |
182 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
182 gtag('js', new Date()); |
183 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
183 gtag('config', '%(key)s'); |
184 })(); |
184 ''' % {'key': ga_key}"></script> |
185 |
|
186 ''' % {'key': config.google_analytics_key}"></script> |
|
187 <!-- end Google Analytics --> |
|
188 </tal:if> |
185 </tal:if> |
|
186 <!-- end Google Analytics --> |
189 |
187 |
190 <tal:if condition="config/uservoice_api_key"> |
188 <tal:if condition="config/uservoice_api_key"> |
191 <!-- UserVoice --> |
189 <!-- UserVoice --> |
192 <script type="text/javascript" tal:content="python:''' |
190 <script type="text/javascript" tal:content="python:''' |
193 |
191 |