Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[Fix bug 836981] Remove WebTrends add Google Analytics #357

merged 1 commit into from Mar 5, 2013


None yet
2 participants

bensternthal commented Feb 26, 2013

Note I did not see the need to add the GA code to settings. This code only appears in a single place.


akatsoulas commented Mar 1, 2013

Please add the bug number at the beginning of the commit message, e.g. [fix bug BugId].

@akatsoulas akatsoulas commented on the diff Mar 1, 2013

@@ -0,0 +1,13 @@
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-35433268-27']);
+ _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);
+ })();

akatsoulas Mar 1, 2013


Just a thought, maybe you could use something like this


where GA_ACCOUNT_CODE is stored in settings/local.py, with the actual key
only on the production server, so that we can avoid hits from local instances, dev and stage servers.
You can also update base.py with GA_ACCOUNT_CODE = None.


bensternthal Mar 1, 2013


We restrict this data in google analytics using a filter, so no data from local dev or stage will show up in reports.

This is only used in one place so I am not sure if we want to add it to settings.



akatsoulas Mar 4, 2013


In that case, please ignore my previous comment.


bensternthal commented Mar 4, 2013

Git commit message updated.


akatsoulas commented Mar 5, 2013

r+ 🍺

@akatsoulas akatsoulas added a commit that referenced this pull request Mar 5, 2013

@akatsoulas akatsoulas Merge pull request #357 from bensternthal/google-analytics
[Fix bug 836981] Remove WebTrends  add Google Analytics

@akatsoulas akatsoulas merged commit 10658cd into mozilla:master Mar 5, 2013

1 check passed

default Jenkins build 'remo_github' #20 has succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment