Skip to content
This repository has been archived by the owner on Dec 8, 2017. It is now read-only.

Duplicate analytics #178

Open
geramirez opened this issue Jul 27, 2015 · 2 comments
Open

Duplicate analytics #178

geramirez opened this issue Jul 27, 2015 · 2 comments
Assignees

Comments

@geramirez
Copy link

There appear to be 2 instance of Google Analytics on the site: on the index page and in the config.js file. The UA code on the index page is the one 18F uses.

Also, we've refined the customizations that we use. The snippet should be the one below. Do you mind changing the current version to the one below:

<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','https://www.google-analytics.com/analytics.js','ga');

ga('create', '<<UA-CODE>>', 'auto');
ga('set', 'anonymizeIp', true);
ga('set', 'forceSSL', true);
ga('send', 'pageview');
</script>
@gbinal
Copy link
Member

gbinal commented Jul 27, 2015

Thanks, @RAMIREZG.

This should be applied to the analytics of https://fbopen.gsa.gov/ and https://pages.18f.gov/fbopen/, both.

@stvnrlly
Copy link
Member

The two tracking codes have different property IDs. It looks like the one on the index page uses the correct ID, while config.js has the wrong ID.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants