Releases: digital-analytics-program/gov-wide-code
DAP 8.7.0
What's new in DAP 8.7.0
What's Changed
- Bumped version number
- Update README.md by @smarina04 in #161
- v8.7 by @ahmedawwad in #170
Full Changelog: v8.6.0...v8.7.0
Note: this version was deployed to sites employing DAP's hosted code on July 7, 2025.
DAP 8.6.0
What's new in DAP 8.6.0
Features
Unified statistics for www and non-www domains
www and non-www traffic is now combined in GA4. So, for instance, instead of seeing separate view counts for gsaadvantage.gov and www.gsaadvantage.gov:
You'll soon start to see a single summed count for gsaadvantage.gov.
Note that this is a change in how the data is collected, not just in how it is displayed, so the change will not be retroactive.
Additional allowed query parameters
lat and lon have been added as allowed query parameters for all agencies.
Bug fixes
Upcoming fix for site leakage between GA4 subproperties
The problem
Agencies have reported that sites that do not belong to their agency sometimes appear within their GA4 subproperty. For instance, the domains report for the Dept. of Treasury might show page view counts for state.gov or opm.gov.
The cause
The full URL field is used to filter data into subproperties but has one known limitation: if a hostname appears within a query string parameter (mostly as a referrer domain) of the actual hostname, it will still be included in the reporting for the subproperty. For example https://usajobs.gov/search/result?query=https://www.ftc.gov/oig will be included in FTC subproperty. While an advanced regex filter was created to address this, GA4's limitations prevent its support.
The solution
Now that GA4 allows filters based on custom dimensions, we are introducing a new custom dimension that captures only the event's hostname. Subproperty filters will be updated to use this hostname dimension instead of the full URL, effectively resolving the issue.
Alongside the code release, we will update the subproperty filters once they migrate to v8.6.
Agency-specific changes
- Department of Commerce: Added
product1as allowed query parameter. - NASA: Added
topicandtitleidas allowed query parameters.
DAP 8.5.0
What's new in DAP 8.5.0
Features
Core Web Vitals
The DAP code now tracks Core Web Vitals for the homepages of all sites. Core Web Vitals are a set of standardized metrics introduced by Google to measure and optimize user experience on websites. They focus on three key aspects of web performance - loading performance, interactivity, and visual stability - in order to provide actionable insights into how users perceive the speed, responsiveness, and stability of a web page.
Reports for Core Web Vitals are available in the "GA4 - Gov-wide DAP Property".
See more details on the wiki.
Bug fixes
- Modified PII redaction to allow valid
latandlonquery string parameters to be reported without redaction (invalid lat/lon values will still be redacted). Previously, such parameters were being misidentified as containing telephone numbers, which caused them to be redacted.
Security and privacy
The Core Web Vitals feature requires a dependency on a new third-party library, web-vitals, which we are hosting alongside the DAP code on https://dap.digitalgov.gov/. The web-vitals library is maintained by the Google Chrome team and is security scanned by our team before it is uploaded to https://dap.digitalgov.gov/.
Agency-specific changes
- Department of Commerce: Added
issuedbyandwwaas allowed query parameters.
DAP 8.4.0
What's Changed
- Copyright message - Removing CP Copyright statement from the DAP code.
- Lowercase Parameter - Only Lowercase page_url and leave other parameters on its original casing
- Add Social Click part of gas4() function
- Query String - “product“ to DOC agency and "PostID" to HUD. site", "lat" and "lon" to DOC/NOAA
DAP 8.3.0
What's Changed
New: HTML 5 Video/Audio Tracker: New functionality was added to track HTML5 Video/Audio. The tracker is on by default, however users can turn in off using a custom parameter "htmlvideo".
New: Added new parameter htmlvideo to enable and disable HTML5 media tracking.
Update: Modified ytm parameter to set milestone value for YouTube and HTML5 media Tracker. This parameter accept 10.20, and 25, If set to any value other than the preset list (10,20,25), it'll be defaulted to 25.
Update: The DAP code was updated to prevent its variables leak into, polluting, and potentially conflict with other variables in the global scope of whatever page the script is included in. This update also fixed the problem where the minifier didn't try to "mangle" (i.e. shorten) top-level variables, which was limiting how much the code can be minified.
v8.2.0
DAP 8.1.0
DAP 8.0.0
DAP 7.0.0
What's new in DAP 7.0.0
Features
Custom Page Title and URL
Enable agencies to report a custom page title and URL by setting the query string parameter (custitle, and custurl) to true, and set the custom_dap_data variable to the new desired custom page title and URL.
Video Progress Events
The YouTube tracker was updated to include new progress events that trigger based on pre-set milestones rather than reporting progress with video pause events.
Customize YouTube milestones
This YouTube tracker update allows agencies to customize the milestones when progress events are triggered. This adds flexibility so agencies can customize the tracker based on their reporting needs. Agencies can choose a value of 10, 20, or 25, representing the percentage frequency at which the event is reported.
Security and privacy
PII Redaction
As of version 6.8, the DAP code included functionality to allow only whitelisted query-string parameters to be reported to Google Analytics and to trim anything else from the page URL. Starting in version 7.0, this functionality was expanded to include all data points collected by Google Analytics, not just the page URL. This means if any other data point is using a parameter that is not whitelisted, it will be removed.
Additionally, a new functionality was added to check the hit payload against a list of potential PII parameters including email, name, telephone number, date of birth, address, and social security number. Except for email addresses, which will be recognized without a key to identify it, all other PII data points are checked based on a key: value presence. If any of the aforementioned potential PII was presented without its key, it will not be redacted.
DAP 6.9.0
What's new in DAP 6.9
New features
Dev mode enablement
Enables DEV mode if the page has a query string parameter key that equals dap-dev-env. If this parameter is detected, traffic will be directed to a Testing Property (GA4).
Feature enhancements
- Prevent the use of the main property ID as parallel trackers to avoid any potential duplication
- Update the AutoTracker to support single-page applications - no need to recall the AutoTracker to track dynamically loaded content.
- Lowercase all AutoTracker event parameters to reduce cardinality and parameters’ letter case variability
- Improve matching and removal of
wwwin URLs - Remove the URL shortened token ( [shrt] ) from file names, due to the increase of the event parameter value size limit to 500 characters for the web for 360 properties instead of 100 characters for standard properties.