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
merged 1 commit into from Mar 5, 2013

Conversation

Projects
None yet
2 participants
Member

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.

Contributor

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

remo/base/templates/includes/google_analytics.html
@@ -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);
+ })();
+
+</script>
@akatsoulas

akatsoulas Mar 1, 2013

Contributor

Just a thought, maybe you could use something like this

https://github.com/mozilla/mozillians/blob/master/templates/includes/google_analytics.html

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

bensternthal Mar 1, 2013

Member

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.

Thoughts?

@akatsoulas

akatsoulas Mar 4, 2013

Contributor

In that case, please ignore my previous comment.

Member

bensternthal commented Mar 4, 2013

Git commit message updated.

Contributor

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
10658cd

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

1 check passed

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