In preparation for the Unified Analytics implementation, we need two things (should take ~10 minutes total):
You will need a Google account; for convenience use the same email used to log in to Google Analytics.
- Go to the Google Tag Manager website. Log in to Google if required.
- Enter Account Name (e.g.
Example Government Name
) - Enter primary domain to be measured, e.g.
example.gov
- Agree to Google Tag Manager Use Policy
The snippet of code to embed on every page will be displayed next. You can always retrieve this from the control panel, but copy and save this for later (we keep ours in a gist on Github).
- You'll be prompted to "create a tag" - ignore this for now.
example snippet:
<!-- Google Tag Manager [example.gov] -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5WL4TR"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5WL4TR');</script>
<!-- End Google Tag Manager -->
-
Name the 1st:
yourcity.gov Reporting
-
Rename the default View "All Web Site Data" to
yourcity.gov Reporting
-
Create a 2nd View in that Property by clicking
copy
, and name ityourcity.gov No Filters
-
Name the 2nd Property:
yourcity.gov Testing
-
Rename the default View from "All Web Site Data" to
yourcity.gov Testing
- Google Tag Manager Documentation
- Google Analytics for Government, Sarah Kaczmarek