Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFC-718: Add missing data attributes to trigger navigation tracking #2365

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

di-aholme
Copy link
Contributor

@di-aholme di-aholme commented Nov 26, 2024

What

The initial implementation of GA4 missed some hooks required to fire the navigation tracker from a button. This PR adds the data-link and data-nav HTML attributes to the govuk buttons on each page

The data-link value for the majority of pages has been defined as /undefined. As the authentication journey has a number of branching paths, this has been discussed with the Analytics team and approved by Sam Evatt.

How to review

Install the chrome extension Tag Assistant Companion
Open the localhost url via Add Domain
The tag assistant will start tracking the analytics events which are fired
Confirm that the navigation tracker is firing for each page
You'll see /undefined as the path for most of the newly configured pages

@di-aholme di-aholme marked this pull request as ready for review November 27, 2024 14:06
@di-aholme di-aholme requested review from a team as code owners November 27, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants