summaryrefslogtreecommitdiffabout
authorWojciech Polak <polak@gnu.org>2014-05-04 13:43:15 (GMT)
committer Wojciech Polak <polak@gnu.org>2014-05-04 13:43:15 (GMT)
commitc01f3a965cc116a7a4aad3c06a802bce49ecf6d9 (patch) (side-by-side diff)
tree3648f39941d3a3ada873f3eaeccadc4b495751bc
parenta6d9d0ac8558575f3dae6500a939302ec9419be8 (diff)
downloadcheetah-c01f3a965cc116a7a4aad3c06a802bce49ecf6d9.tar.gz
cheetah-c01f3a965cc116a7a4aad3c06a802bce49ecf6d9.tar.bz2
Migrate from ga.js to analytics.js.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/login.php14
-rw-r--r--frontend/reader.php15
2 files changed, 13 insertions, 16 deletions
diff --git a/frontend/login.php b/frontend/login.php
index bd1971e..c995bd2 100644
--- a/frontend/login.php
+++ b/frontend/login.php
@@ -316,7 +316,7 @@ echo '<html xmlns="http://www.w3.org/1999/xhtml">';
<div>
<?php i18n_get_content ('description'); ?>
</div>
- <p><span id="aboutSignIn" class="link"><?php echo _('Sign in'); ?></span>&nbsp;</p>
+ <p><span id="aboutSignIn" class="link" style="font-size:larger"><?php echo _('Sign in'); ?></span>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div id="banner">
@@ -350,12 +350,12 @@ window.fbAsyncInit = function() {
<?php if (isset ($CONF['google.analytics']) && !isset ($_GET['openid_mode'])) { ?>
<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker('<?=$CONF["google.analytics"]?>');
-pageTracker._trackPageview();
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+ga('create', '<?=$CONF["google.analytics"]?>', 'www.cheetah-news.com');
+ga('send', 'pageview');
</script>
<?php } ?>
diff --git a/frontend/reader.php b/frontend/reader.php
index 38abe57..388ad63 100644
--- a/frontend/reader.php
+++ b/frontend/reader.php
@@ -364,15 +364,12 @@ var SIGS = {'js':'".$SIGS["js"]."', 'tr':'".$SIGS["tr"]."', 'wt':'".
<?php if (isset ($CONF['google.analytics'])) { ?>
<script type="text/javascript">
-var _gaq = _gaq || [];
-_gaq.push(['_setAccount', '<?=$CONF["google.analytics"]?>']);
-_gaq.push(['_setDomainName', 'www.cheetah-news.com']);
-_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);
-})();
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+ga('create', '<?=$CONF["google.analytics"]?>', 'www.cheetah-news.com');
+ga('send', 'pageview');
</script>
<?php } ?>

Return to:

Send suggestions and report system problems to the System administrator.