Check Your Site for Proper Google Analytics Tagging
In a recent audit, we found that many USDA web pages were using multiple sets of Google Analytics (GA) tags—three, four, even eight sets of GA tags on each page. Having too many sets of GA tags on your pages will significantly slow down your site (and potentially hurt your search engine optimization). Having too many GA tags will also make your analytics less accurate: Some users will leave your page before the tags finish loading, resulting in undercounts of your user sessions and other inaccuracies.
How to Audit Your Website Using Google Analytics Tags
1Install the Tag Assistant
Using Google’s Chrome Browser, download and install the Tag Assistant (by Google) browser extension. If a Google Chrome exemption is needed, you can get one through the IT security department.
2Click on the New Tag Assistant Icon
Find the new Tag Assistant icon in the extension bar and click it:
3Click the Enable Button
4Visit Web Page
Visit or reload your web page:
Notice that the Tag Assistant icon will now display a count of the Google tags it has found on the site:
5Click on the Tag Assistant Icon Again
Click on the Tag Assistant icon again to display information about the specific tags found on the page.
The Tag Assistant will list all Google Analytics and Google Tag Manager tags found on this page. It will display the associated “UA Number” identifying each specific code. For USDA-owned sites, you should see the following UA Numbers:
Required: Digital Analytics Program (DAP) Google Analytics Code
If you do not see this UA Number listed, see our Implement Digital Analytics Program (DAP) Code guideline for implementing on your site.
Required: USDA Official Google Analytics Code
If you do not see this UA Number listed, see our Implement USDA Official Code guideline for implementing on your site.
Optional: One Agency-Specific Analytics Code
USDA allows you to have one instance of an agency-specific GA tag on your site.
The more tags on a page, the longer that page takes to load, and the greater risk of collecting and reporting incorrect data. USDA urges all of its agencies to limit the number of GA tags to a total of three sets of GA tags: one each for the required “Digital Analytics Program (DAP)” and “USDA Official Google Analytics” tags, and one optional tag for your agency.
Optional: Google Tag Manager (GTM) Code
This will be specific to your site’s GTM account, but will always start with “GTM:” followed by a string of numbers and letters.
|Google Tag Manager
If you discover additional Google Analytics tags:
- Contact the person or team that manages your site content or your site’s webmaster.
- Work with them to determine who owns the Google Analytics accounts outside of the DAP, USDA Official, and the specific agency’s optional code.
- Contact these account owners to inform them that their code will be removed and work with them to understand their needs.
- If you decide, after discussing with the account owners, that they do need to access analytics data, work with them to give them proper permissions within the USDA Official or the agency’s specific Google Analytics accounts.
Implement Digital Analytics Program (DAP) Code
No-cost, government-wide web analytics tool
Ongoing help desk and data reporting support: firstname.lastname@example.org
Once you have verified that your site does not contain the DAP Google Analytics Code, it’s time to move forward with registering and implementation.
Define a DAP point of contact on your team. The POC must be a .gov user (typically, a Product Owner or Program Manager).
GSA will send the agency point of contact a short sign-up form to register their agency and work with them to implement the common page tag code.
GSA will provide implementation support, access to training, and other resources to agency points of contact.
If you don’t have an identified point of contact, send an email to: email@example.com
Your web manager will place code in the header of all your site’s web pages that “calls" the DAP code, which is hosted at a central location
Using Google’s Chrome Browser, you can use the Tag Assistant (by Google) browser extension to confirm the presence of the DAP Google Analytics Code.
Implement USDA Official Code
USDA requires that your site have the Official USDA Google Analytics code. This code helps track usage across the agency and provides an important, birds-eye view of key metrics to leadership.
Once you have verified that your site does not contain the USDA Google Analytics Code, it’s time to move forward with implementing the code.
How to Implement the USDA Official Google Analytics Code
The process of adding USDA’s official department-wide Google Analytics code to your website’s pages is similar to the way your agency adds the government-wide DAP Google Analytics code. Please email firstname.lastname@example.org for specific guidance and instructions.
Using Google’s Chrome Browser, you can use the Tag Assistant (by Google) browser extension to confirm the presence of the USDA Official Google Analytics code.
Previous: Analytics Next: Content
This page was last updated July 31, 2019.