Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mozilla/kuma
...
head fork: mozilla/kuma
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 22, 2013
@darkwing darkwing Don't load analytics on dev 7632b9f
Commits on Mar 25, 2013
@groovecoder groovecoder Merge pull request #954 from darkwing/analytics-dev
Don't load analytics on dev
660f95d
View
2  apps/landing/test_templates.py
@@ -27,7 +27,7 @@ def test_social_promo(self):
def test_google_analytics(self):
url = reverse('landing.views.home')
- constance.config.GOOGLE_ANALYTICS_ACCOUNT = ''
+ constance.config.GOOGLE_ANALYTICS_ACCOUNT = '0'
r = self.client.get(url, follow=True)
eq_(200, r.status_code)
ok_('var _gaq' not in r.content)
View
12 templates/includes/google_analytics.html
@@ -1,15 +1,15 @@
-{% if config.GOOGLE_ANALYTICS_ACCOUNT %}
+{% if config.GOOGLE_ANALYTICS_ACCOUNT != '0' %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ config.GOOGLE_ANALYTICS_ACCOUNT }}']);
_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(a, d) {
+ var ga = d.createElement(a); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == d.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = d.getElementsByTagName(a)[0]; s.parentNode.insertBefore(ga, s);
+ })('script', document);
</script>
{% endif %}

No commit comments for this range

Something went wrong with that request. Please try again.