Procedure: Google Analytics (GA) Event Tracking
Brief Description
EPA uses Google Analytics (GA) Event Tracking to track link clicks across its public websites as part of the agency Web analytics code. This procedure explains the types of links that are tracked automatically and the approval process for new GA Events. For more general information about GA, review the Web analytics section of the Web Guide.
- Rationale
- Definitions
- Required Steps
- Exemptions
- See Also
- Related Governance Documents
- Full Metadata about this Procedure
Rationale
However Event tracking is implemented, GA Events cannot be restricted to a particular GA account. This means that all Events triggered on webpages tracked by the agency GA account are reported in the agency GA account interface, regardless of their purpose. Therefore, it is extremely important to limit secondary GA accounts and to maintain a consistent and logical naming scheme for GA Events. The approval process in this procedure will help to identify duplicate or unnecessary Events and ensure a logical naming scheme for new Events.
Definitions
Google Analytics (GA) Events: In GA, Events constitute all website interactions other than page loads (Pageviews). Clicks on links to downloadable files, Flash and AJAX elements, or buttons associated with video players and other applications can all be coded and tracked as Events.
GA Events can be implemented by manually coding each webpage element or by JavaScript designed to automatically implement Event tags whenever certain page elements are activated. The agency GA code, for example, automatically “tags” different types of links (downloadable files, external links, email links) for Event tracking.
For every Event, you can define up to five hierarchical components, but only the following three are required for use on the EPA website:
- Event Category
- Event Action
- Event Label
Event Categories: As it represents the highest classification-level, you should always define Event Categories in the broadest of possible terms. This will allow you to capture large groups of related Event Actions under a single Event Category.
For example, one of the agency-approved Event Categories is Download, under which there are Event Actions for all the various file extensions we track. Another example is External, which includes clicks on all non-EPA links.
Below are examples of approved agency-wide Event Categories:
- Download – Links to downloadable files.
- External – Links to external (non-EPA) websites.
- Email – Email address links
- Cross-domain – Links that take Visitors from one EPA domain to another (e.g www.epa.gov to www.energystar.gov)
- Banner – EPA homepage banner links
Event Actions: Event Actions represent the many values within a particular Event Category. For example, PDF Click, CSV Click, and EXE Click, are all Event Actions under the Download Category. No single file extension should represent an entire Event Category, since a single file extension is only one value among many other file extensions.
Event Labels: As another descriptor, you should use Event Labels to uniquely identify a particular instance of an Event Action. For example, under the Event Action PDF Click, the actual name of the PDF file is the Event Label.
Required Steps
For all GA Events, including those that predate this procedure, you must get approval from the Web Analytics Program by following the process detailed below. Before taking this step, however, it is important to check what functionality already exists and understand how EPA defines Events.
Step 1. Check if existing approved Events already provide what you need
Before you request approval to create a new Event, be sure to review the approved agency-wide Events that are automatically tracked across EPA websites. Do not duplicate any functionality already implemented by these Events. For example, there should be no Events created to track PDF clicks on any EPA webpage since this is automatically tracked under the Download Category.
Note: The Web Analytics Program will ask you to remove any Events that duplicate the functionality of the approved agency-wide Events.
If an Existing Event Category does meet your needs, be sure to use all existing Event Actions under that category that apply. For example, you should not create a new Event Action under the Download Category called Excel Click, since this is already covered by XLS Click.
Step 2. Carefully consider how you might define your new Event Category
After you have confirmed that none of the approved agency-wide Event Categories cover the particular webpage elements you wish to track, you will need to suggest an Event Category that is both broad in scope and sustainable. Consider the following:
- Will others be interested in tracking this type of Event?
- Is this type of Event unique to a particular program office or application?
- Will I want to expand on this Event Category with additional Event Actions in the future?
As an example, if you want to track elements that are unique to a particular application, you may want to include your organization name and the application name in the Event Category name (e.g. OEI_BetaApp). This will help other users understand that this new Event Category only applies to a specific office and application. You would then create Event Actions to specify unique interactions with the application and Event Labels to further distinguish between those types of Actions (e.g. Category = OEI_BetaApp; Action = Map Component_1; Label = Facility Page)
After reviewing all approved agency-wide Event categories and carefully considering a naming scheme that is both uniquely identifiable and sustainable, you are ready to submit your request for approval.
Step 3. Submit your request to the Web Analytics Program
Submit a proposed naming scheme for the Event Category you wish to implement, along with a description of all the webpage elements you intend to include within the Event Category, and the web area where you would implement these Events. Send this information to the Web Analytics Program.
Step 4. Wait for approval from the Web Analytics Program
Under normal circumstances, your request will be reviewed within two business days.
If there are any concerns with the suggested naming scheme, the program will work with you to adjust the naming scheme accordingly.
Step 5. Upon approval, implement your new GA Events
Only implement the approved GA Event. All subsequent Event Categories will require separate approval.
Exemptions
There are no exemptions to this procedure.
See Also
Related Governance Documents
EPA
Related Policies
- None
Related Procedures
- Maintaining Agency Web Analytics Code on all Public HTML Pages
- Web Measurement and Customization Technology (Cookies) Procedure
Related Standards
- None
Related Guidance
- None
Non-EPA
- 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-12, Peter Orszab, Director, “Guidance for Online Use of Measurement and Customization Technologies,” June 25, 2010.(9 pp, 103 K, About PDF)
Full Metadata about this Procedure
Name Google Analytics (GA) Event Tracking
Type Procedure
Required or Recommended Required
Effective date 04/09/14
Date approved 05/12/2021
Category Google Analytics
Web Council review by 05/12/2024 (or earlier if deemed necessary by the Web Council)
Governing Policy Web Governance and Management