Skip to content

Commit

Permalink
Merge pull request #522 from pmclanahan/bug-818195-fix-google-analytics
Browse files Browse the repository at this point in the history
Bug 818195: Fix google analytics variables.
  • Loading branch information
pmac committed Dec 7, 2012
2 parents a614fee + 007071b commit 38ae8e3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions templates/includes/google-analytics.html
@@ -1,22 +1,20 @@
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ settings.GA_ACCOUNT_CODE }}']);
_gaq.push(['_trackPageview']);

// In-page analysis
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', '{{ settings.GA_ACCOUNT_CODE }}']);
_gaq.push(['_setDomainName', 'mozilla.org']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_setAllowAnchor', true]);
_gaq.push(['_trackPageview']);

{% if settings.GA_ACCOUNT_CODE %}
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;

var prefix = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www');
var prefix = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www');
ga.src = prefix + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0];
Expand Down

0 comments on commit 38ae8e3

Please sign in to comment.