usagov / usa.gov

Feedback and conversation about USA.gov & GobiernoUSA.gov.
12 stars 8 forks source link

Site isn't using Google Analytics UA #2

Closed konklone closed 9 years ago

konklone commented 9 years ago

The site's own analytics tracker (not the DAP) is using the old style of tracker:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-28227333-1']);
  _gaq.push(['_setDomainName', 'usa.gov']);
  _gaq.push(['_setAllowLinker', true]);
  _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>

This should use the new Universal Analytics tracker, to avoid being shut off by Google in the future.

jrears commented 9 years ago

Definitely should update

smileytech commented 9 years ago

Thanks for the suggestion! We’ve made this change on the sites.