andriusvelykis / reflow-maven-skin

Reflow is an Apache Maven site skin built on Bootstrap. It allows various structural and stylistic customizations to create a modern-looking Maven-generated website.
http://andriusvelykis.github.io/reflow-maven-skin/
Apache License 2.0
132 stars 57 forks source link

Update Google Analytics Script #38

Open gonzalezsieira opened 10 years ago

gonzalezsieira commented 10 years ago

The script given by Google Analytics to put in the webpaches has changed, now it is given in the following way:

<script>
  (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', 'PUT-HERE-YOUR-GOOGLE-ANALYTICS-ID', 'auto');
  ga('send', 'pageview');

</script>

The auto-generated by the label <googleAnalyticsAccountId> is different, maybe from previous versions of Google Analytics. Please update the decorator to avoid compatibility problems with newer versions of Analytics.

andriusvelykis commented 10 years ago

Thanks for reporting. Unfortunately, I don't have any time to spend on this in the immediate future - I am busy writing up my PhD thesis.

I will look into it (and update) later. I think as a workaround you can add the correct version of your script directly as HTML, right?

gonzalezsieira commented 10 years ago

Yes, that's right. But don't worry, the main features of Analytics work even with the old script. I think it is only needed to activate the new "Universal Analytics" which is being introduced recently.