Google Analytics – Statewide Analytics Code Setup

Google Search Console – Setup and User Access

Google Analytics launched a brand new site to showcase many of the most popular Google Analytics demos and tools. The entire site is

  • Open sourced
  • Uses public APIs
  • Available on GitHub

Check it out at:


Here is the code you need for Google Analtyics:

Highlighted is statewide analytics tracking code. Place it before closing </head> tag in your web page.

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX']); // your google analytics profile code from your agency's google account
  _gaq.push(['_setDomainName', '']);
  _gaq.push(['b._setAccount', 'UA-3419582-2']); // statewide analytics - do not remove or change
  _gaq.push(['b._setDomainName', '']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);