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

Add a new GA4 'focus loss' tracker #3920

Merged
merged 1 commit into from Mar 15, 2024
Merged

Add a new GA4 'focus loss' tracker #3920

merged 1 commit into from Mar 15, 2024

Conversation

AshGDS
Copy link
Contributor

@AshGDS AshGDS commented Mar 15, 2024

What

  • Adds a new tracker called the ga4-focus-loss-tracker
  • Have tested it with a couple elements in static and seems to be working as intended

Why

Visual Changes

None.

@AshGDS AshGDS self-assigned this Mar 15, 2024
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3920 March 15, 2024 10:48 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3920 March 15, 2024 10:50 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3920 March 15, 2024 10:52 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3920 March 15, 2024 10:58 Inactive
@AshGDS AshGDS requested a review from andysellick March 15, 2024 11:03
@AshGDS AshGDS marked this pull request as ready for review March 15, 2024 11:03
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, well done 👍

Just a couple of minor things.

var element
var expected

function agreeToCookies () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: I think we're using this kind of function in a few places now - worth raising an issue/adding a ticket to see if we can define it once in a helper somewhere instead of repeating it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

@@ -740,7 +740,7 @@ describe('A specialist link tracker', function () {
})

afterEach(function () {
GOVUK.cookie('cookies_policy', null)
GOVUK.setCookie('cookies_policy', null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that .cookie and .setCookie were equivalent, is that not the case? Was this causing an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fault - saw it and thought it was a typo. Will revert

@@ -0,0 +1,16 @@
# Google Analytics 4 focus loss tracker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good documentation. Can you include a link to it in ga4-all-trackers.md?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done 👍

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3920 March 15, 2024 14:36 Inactive
@AshGDS AshGDS merged commit b7651f7 into main Mar 15, 2024
12 checks passed
@AshGDS AshGDS deleted the ga4-focus-loss-tracker branch March 15, 2024 14:40
@AshGDS AshGDS mentioned this pull request Mar 20, 2024
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.

None yet

3 participants