Government-Wide Analytics Tool for Federal Agencies

Milestone 8.2 of the Digital Government Strategy calls for agencies to implement performance and customer satisfaction measuring tools on all .gov websites. To help your agency meet this requirement, GSA’s Digital Services Innovation Center procured a Google Analytics (GA) Premium custom solution that does the following:

  • Provides a federal-wide view of .gov websites
  • Is easy to add to your site with only one line of code
  • Smoothly integrates with GA code you may already have on your site

Instructions for Adding Custom Web Analytics Code to Federal Agency Websites

Agencies have two options for the DAP code implementation, all described in detail in the DAP Implementation Guide and outlined below.

  1. Centrally hosted (recommended): the implementation involves calling the DAP code file via a central host location that the Digital Analytics Program hosts at:

    The DAP team continuously updates this file with new versions and/or bug fixes periodically, and those changes take effect immediately on sites implemented with the file via the above location. We’ve taken every measure possible to make this option easy and secure. Please see our GitHub repo for more explanation and the implementation guide for specific steps.

  2. Locally hosted: The other (original) option is to continue to host the DAP code file locally, as many agencies have done in the past. If you determine this is the right option for your agency website, please choose one of the below file versions (posted on Github) to host the DAP code locally and review the implementation guide for specific steps.

Regular version of the DAP code
Minified version of the DAP code

In addition, those implementing should read capabilities of the code in the version 4.1 Code Summary, and the version 4.1 Release Notes.

With either option (centrally or locally hosted), the Government-Wide Digital Analytics Program website traffic data is being filtered into its own separate Google Analytics account and should cause no material change in your independent Google Analytics account metrics.Note: When migrating from DAP Google Analytics “Classic” to DAP Universal Analytics (UA), you must replace both the old javascript code file and the script block/tag, as specified in the Implementation Guide, to follow the new UA format.

If you have any questions, please email us at We’d be happy to assist.

U.S. federal government agency websites using Google Analytics Premium as part of the Digital Government Strategy may place the following information on their website:

This website uses Google Analytics Premium. Please refer to the following policies on Google’s website for more information:

File name

File path


Link Shortcode

{{< link "services/" >}}