You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ri...@apache.org on 2017/10/16 13:45:09 UTC

[15/18] brooklyn-docs git commit: Fix Google Analytics metrics collection

Fix Google Analytics metrics collection

Replace GA UA ID with one that we control (!)
Fix JS bug which meant that metrics were not collected


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/81b62658
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/81b62658
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/81b62658

Branch: refs/heads/master
Commit: 81b62658e910480fcff415d6c8d3aafff0bde2c1
Parents: bebf28a
Author: Richard Downer <ri...@apache.org>
Authored: Mon Oct 16 11:21:59 2017 +0100
Committer: Richard Downer <ri...@apache.org>
Committed: Mon Oct 16 14:07:30 2017 +0100

----------------------------------------------------------------------
 style/js/public.js | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/81b62658/style/js/public.js
----------------------------------------------------------------------
diff --git a/style/js/public.js b/style/js/public.js
index 9742489..7535c7a 100644
--- a/style/js/public.js
+++ b/style/js/public.js
@@ -105,16 +105,7 @@
     });
 
 
-    <!-- analytics -->
-    var _gaq = _gaq || [];
-    _gaq.push(['_setAccount', 'UA-30530918-1']);
-    _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);
-    })();
 
     <!-- page warning (for archive pages) -->
     if (document.location.pathname.indexOf('guide/') > -1) {
@@ -164,4 +155,15 @@
         $('#page_notes').fadeIn('slow');
         event.preventDefault ? event.preventDefault() : event.returnValue = false;
     }
-})(jQuery, ZeroClipboard);
\ No newline at end of file
+})(jQuery, ZeroClipboard);
+
+<!-- analytics -->
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-107990351-1']);
+_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);
+})();
\ No newline at end of file