Procedure: Maintaining the Agency Web Analytics Code on all Public HTML Pages
Brief Description
(see the full document below for details)
This procedure describes the required steps to ensure that EPA maintains quality Web traffic metrics for all content that is publicly accessible, in adherence to the OMB Digital Strategy. This procedure applies to all public Web content on EPA servers, including dynamically generated Web content.
Web analytics tools provide essential services to Web content owners in all agency programs and regions such as measuring website traffic, identifying top audiences, improving search engine optimization (SEO), and analyzing the influence of social media sites. Web analytics tools that rely on page tagging often provide the most robust capabilities for collecting and analyzing Web traffic metrics. However, it is critical that the necessary Web analytics code is implemented and maintained on all public Web content. Removing the Web analytics code from a Web content results in the loss of Web traffic metrics for that Web content until the code is returned. For this reason, program offices must always comply with this procedure.
On this Page
- Definitions
- Requirements
- Content: None
- Style: None
- Required Steps
- Rationale
- Exemptions
- Process for Validating Compliance
- See Also
- Related Governance Documents
- Full Metadata about this Procedure
Definitions
- Digital Analytics Program (DAP): A shared service run by GSA that collects requires web analytics data for all Federal Web sites. Including the Agency's Web analytics code on your pages and applications ensures that your content and applications are compliant with the DAP.
- Log File Analyzers: Log file analysis is the method of processing Web server logs using a Web analytics software designed for that purpose. Since server logs record all server transactions, including activity from Web crawlers and bots, software is needed to filter out non-human activity.;
- Page Tag: A page tag is a commonly used term in Web analytics that refers to a snippet of JavaScript code that is embedded on a Web page and executed when the page is loaded in a Web browser.
- Page Tagging: Page tagging refers to the method of embedding snippets of Web analytics code (page tags) in the source code of a Web page. When a Web page is loaded by a Web browser, visitor session data are sent to a third-party vendor for processing.
- Public means any content that is not meant for Federal employees.
- Tag Management: Tag management is a service provided by third-party vendors whereby the vendor hosts all an organization’s analytics page tags for easy maintenance via a user interface. The page tags are activated by a single tag management script called a container tag, which is inserted in the source code of Web content.
Required Steps
EPA content owners, such as Editors in Chief (EICs) and Web application owners, are responsible for ensuring that all Web content under their purview and responsibility include the agency Web analytics code at all times. Ultimate responsibility for compliance with this procedure rests with the Senior Information Officer (SIO) of each program office, with Web Council representatives serving as liaisons in ensuring this procedure is disseminated to all EPA content owners. Program offices must comply with this procedure within three months of its signing and maintain compliance as new Web content is developed. Content owners must ensure that the agency Web analytics code is included on all new Web content, starting from the initial public release of that content.
Including the agency Web analytics code on your pages and applications ensures that your content and applications are compliant with the Digital Analytics Program (DAP).
For Content in the Agency Web Content Management System (WebCMS)
Web content published in the standard Web Content Management System (WebCMS) will automatically include the agency Web analytics code and comply with the DAP when the content is published. No further action is needed by www.epa.gov (and espanol.epa.gov) content owners.
For Content Outside of the Agency Web Content Management System Using Standard EPA Templates
- Review all Web content, including Web applications, for which you are responsible to ensure that your application template for every application page includes the Agency's Google Tag Manager (GTM) code.
- Applications using the application template should include the Google Tag Manager code snippet. Do not remove this code. If you do, your application will no longer comply with the DAP.
- Insert the agency Web analytics code into the source code for all Web content not already in compliance.
- Contact the EPA’s Web Analytics Program to ensure metrics are being collected for your content.
- Ensure that the Agency's GTM code remains on your Web content at all times. If you need to remove the GTM code for any reason, contact the Web Analytics Program for an alternative method of adding the agency Web analytics code to your Web content.
For Content with Custom and Outdated Templates
A tag management script is used to insert the agency Web analytics code onto Web content using custom templates. Web content with outdated templates should be updated as soon as possible; however, the same tag management script used for Web content with custom templates can be used to bring Web content with outdated templates into compliance with this procedure until such time as their templates can be updated.
- Review all Web content, including Web applications, for which you are responsible and ensure that all pages include the Agency's Google Tag Manager (GTM) code.
- Insert the agency Web analytics code into the source code for all Web content not already in compliance.
- Contact the EPA’s Web Analytics Program to ensure metrics are being collected for your content.
- Ensure that the Agency's GTM code remains on your Web content at all times. If you need to remove the GTM code for any reason, contact the Web Analytics Program for an alternative method of adding the agency Web analytics code to your Web content.
Agency's Google Tag Manager Code
Paste this code as high in the <head> of the page as possible:
<!-- Google Tag Manager -->
<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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-L8ZB');</script>
<!-- End Google Tag Manager -->
Additionally, paste this code immediately after the opening <body> tag:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-L8ZB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Rationale
Federal agencies are required to comply with the OMB M-17-06, Policies for Federal Agency Public Websites and Digital Services (PDF, 1.2 MB, 18 pages, November 2016) policy which says:
All agencies must participate in the General Service Administration’s (GSA) Digital Analytics Program (DAP) and deploy the DAP tracking code on all public facing agency websites.
Page tagging Web analytics solutions provide a host of capabilities, including custom segmentation and ad hoc reports through a user interface. However, unlike log file analyzers that process Web server logs, page tagging tools require JavaScript code to be included in the source code of all Web content for which metrics are collected. Removing the Web analytics code from a Web page results in the loss of Web traffic metrics for that Web page until the code is returned.
Exemptions
There are no exemptions to this procedure.
Process For Validating Compliance
The Digital Analytics Program - Process For Validation EPA Public Website Compliance is intended to ensure that the EPA collects and uses the best web analytics data to optimize EPA public websites and fully comply with the requirements of the General Services Administration’s (GSA) Digital Analytics Program (DAP).
See Also
Related Governance Documents
EPA
Related Policies
- None
Related Procedures
- None
Related Standards
- None
Related Guidance
- None
Non-EPA
- 21st Century Integrated Digital Experience Act, Dec 2018
- OMB M-23-22: Delivering a Digital-First Public Experience, September 22, 2023.
- OMB Digital Strategy, Federal Chief Information Officer, “Digital Government: Building a 21st Century Platform to Better Serve the American People,” May 23, 2012.
- OMB Memorandum M-10-22, Peter Orszab, Director, “Guidance for Online Use of Measurement and Customization Technologies,” June 25, 2010.
Full Metadata about this Procedure
Name: Maintaining the Agency Web Analytics Code on all Public HTML Pages Procedure
Type: Procedure
Required or Recommended Required
Effective date June 12, 2013
Date approved 01/12/2022
Category
Web Council review by January 2024 (or earlier if deemed necessary by the Web Council)
Governing Policy Web Governance and Management