department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

GA4: Test Implementation of Trailing Slash Issue #88458

Open johnny-jesensky-adhoc opened 1 month ago

johnny-jesensky-adhoc commented 1 month ago

Description

An identified issue in GA4 is that the many pages have 2 versions -- one with a trailing slash and one without -- which complicates the reporting for many users. While this really should be fixed on the backend/server side (there's SEO considerations here too), it was "fixed" for reporting in UA using View filters but GA4 does not offer those types of filters. Instead, we have to look for a solution at the point of data collection using GTM. I [Jamie] think I've found a relatively simple solution that will work for HTML page views in this Reddit thread.

If this JS does work, I can look at modifying it for history change page views -- how most dynamically loaded pages are tracked.


Tasks

Acceptance Criteria

johnny-jesensky-adhoc commented 1 month ago

@jestutt -- Can I move this to In Progress?

jestutt commented 1 month ago

The code has been implemented to the lower environments. Will check back in 5-7 days (maybe sooner) to see if it worked or not.

johnny-jesensky-adhoc commented 1 month ago

Thanks for the update @jestutt. We'll plan to monitor the fix next week, before we implement in production. Then will look to close this out.

FYI @jwoodman5, @raywangoctova

jwoodman5 commented 1 month ago

Copy, thanks.

johnny-jesensky-adhoc commented 4 weeks ago

Our team got pulled into an audit this sprint which has dominated a lot of Jamie and I's time -- we took some things out of the current sprint to account for this, but kept this -- this one will roll into the next sprint.

FYI @jwoodman5, @jestutt

johnny-jesensky-adhoc commented 2 weeks ago

Jamie was out today (8/28) and yesterday (8/27), and I've been unable to verify the latest on this fix. I will check back in again with her tomorrow, if she is back and determine if this will carry over, or if we can move to Done.

FYI - @jwoodman5, @jestutt

johnny-jesensky-adhoc commented 1 day ago

Keep this in the backlog until the audit is finalized.

FYI @jestutt