| Thread Previous • Date Previous • Date Next • Thread Next |
------------------------------------------------------------ revno: 13315 committer: Morten Olav Hansen <mortenoh@xxxxxxxxx> branch nick: dhis2 timestamp: Wed 2013-12-18 17:29:33 +0100 message: minor google analytics fixes modified: dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/layout.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm 2013-05-06 10:22:55 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm 2013-12-18 16:29:33 +0000
@@ -19,4 +19,19 @@
#parse( $page )
</div>
+
+#* Seems we can't access macros.vm from login.vm/login_mobile.vm so we include the full script here *#
+#if( $googleAnalyticsUA && $googleAnalyticsUA != '' )
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '$encoder.jsEncode($googleAnalyticsUA)']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+#end
</body>
=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/layout.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/layout.vm 2013-11-25 09:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/layout.vm 2013-12-18 16:29:33 +0000
@@ -30,7 +30,20 @@
#parse( $page )
#end
-#googleAnalyticsUA()
+#* Seems we can't access macros.vm from login.vm/login_mobile.vm so we include the full script here *#
+#if( $googleAnalyticsUA && $googleAnalyticsUA != '' )
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '$encoder.jsEncode($googleAnalyticsUA)']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+#end
</body>
</html>
| Thread Previous • Date Previous • Date Next • Thread Next |