Skip to main content
U.S. flag

An official website of the United States government

Here’s how you know

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

HTTPS

Secure .gov websites use HTTPS
A lock (LockA locked padlock) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

    • Environmental Topics
    • Air
    • Bed Bugs
    • Cancer
    • Chemicals, Toxics, and Pesticide
    • Emergency Response
    • Environmental Information by Location
    • Health
    • Land, Waste, and Cleanup
    • Lead
    • Mold
    • Radon
    • Research
    • Science Topics
    • Water Topics
    • A-Z Topic Index
    • Laws & Regulations
    • By Business Sector
    • By Topic
    • Compliance
    • Enforcement
    • Laws and Executive Orders
    • Regulations
    • Report a Violation
    • Environmental Violations
    • Fraud, Waste or Abuse
    • About EPA
    • Our Mission and What We Do
    • Headquarters Offices
    • Regional Offices
    • Labs and Research Centers
    • Planning, Budget, and Results
    • Organization Chart
    • EPA History

Breadcrumb

  1. Home
  2. Web Policies and Procedures

Procedure: Maintaining the Agency Web Analytics Code on all Public HTML Pages

Brief Description

(see the full document below for details)

About this Procedure

Required or Recommended: Required

Effective Date: June 12, 2013

Full Document Metadata

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
      • Agency's Google Tag Manager Code
  • 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

  1. 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.
  2. Insert the agency Web analytics code into the source code for all Web content not already in compliance.
  3. Contact the EPA’s Web Analytics Program to ensure metrics are being collected for your content.
  4. 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.

  1. 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.
  2. Insert the agency Web analytics code into the source code for all Web content not already in compliance.
  3. Contact the EPA’s Web Analytics Program to ensure metrics are being collected for your content.
  4. 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

  • CIO 2180.2 Web Governance and Management Policy 
  • CIO 2171.0 Information Access Policy

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 4/9/2025
Category 
Web Council review by 4/9/2028 (or earlier if deemed necessary by the Web Council)
Governing Policy Web Governance and Management

Web Policies and Procedures

  • Web Policies and Procedures Resources
  • EPA Web Standards
  • Historical Memoranda
  • Plain Writing
  • EPA Disclaimers
Contact Us About Web Policies and Procedures
Contact Us to ask a question, provide feedback, or report a problem.
Last updated on April 21, 2025
  • Assistance
  • Spanish
  • Arabic
  • Chinese (simplified)
  • Chinese (traditional)
  • French
  • Haitian Creole
  • Korean
  • Portuguese
  • Russian
  • Tagalog
  • Vietnamese
United States Environmental Protection Agency

Discover.

  • Accessibility Statement
  • Budget & Performance
  • Contracting
  • EPA www Web Snapshot
  • Grants
  • No FEAR Act Data
  • Plain Writing
  • Privacy
  • Privacy and Security Notice

Connect.

  • Data
  • Inspector General
  • Jobs
  • Newsroom
  • Regulations.gov
  • Subscribe
  • USA.gov
  • White House

Ask.

  • Contact EPA
  • EPA Disclaimers
  • Hotlines
  • FOIA Requests
  • Frequent Questions
  • Site Feedback

Follow.