src/ztfy/myams/templates/fullpage-modal-layout.pt
changeset 223 662e8fc90c14
parent 101 8364fb15bfe5
equal deleted inserted replaced
222:8370c624fc44 223:662e8fc90c14
    31 			 tal:attributes="class string:modal-dialog ${view/dialog_class}">
    31 			 tal:attributes="class string:modal-dialog ${view/dialog_class}">
    32 			<tal:var replace="structure provider:pagelet" />
    32 			<tal:var replace="structure provider:pagelet" />
    33 		</div>
    33 		</div>
    34 	</div>
    34 	</div>
    35 
    35 
    36 	<tal:if condition="config/google_analytics_key">
    36 	<!-- Google Analytics -->
    37 		<!-- Google Analytics -->
    37 	<tal:if define="ga_key config/google_analytics_key"
    38 		<script type="text/javascript" tal:content="python:'''
    38 			condition="ga_key">
    39 
    39 		<script async
    40 		  var _gaq = _gaq || [];
    40 				tal:attributes="src string:https://www.googletagmanager.com/gtag/js?id=${ga_key}"></script>
    41 		  _gaq.push(['_setAccount', '%(key)s']);
    41 		<script tal:content="python:'''
    42 		  _gaq.push(['_trackPageview']);
    42 			window.dataLayer = window.dataLayer || [];
    43 
    43 			function gtag() {
    44 		  (function() {
    44 				dataLayer.push(arguments);
    45 			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    45 			}
    46 			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    46 			gtag('js', new Date());
    47 			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    47 			gtag('config', '%(key)s');
    48 		  })();
    48 		''' % {'key': ga_key}"></script>
    49 
       
    50 		''' % {'key': config.google_analytics_key}"></script>
       
    51 		<!-- end Google Analytics -->
       
    52 	</tal:if>
    49 	</tal:if>
       
    50 	<!-- end Google Analytics -->
    53 </body>
    51 </body>
    54 </html>
    52 </html>