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

GA4 homepage indexes #3784

Merged
merged 3 commits into from
Oct 2, 2023
Merged

GA4 homepage indexes #3784

merged 3 commits into from
Oct 2, 2023

Conversation

andysellick
Copy link
Contributor

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

What

Restore correct GA4 tracking indexes for six sections of the homepage.

  • each part of the homepage when tracked should include an index section (the index of the section) and an index section count (the total number of sections, currently 6)
  • sections were recently reordered, which caused the tracking to report incorrect numbers
  • restoring these numbers as partial variables passed from the main index template, to help highlight their existence and purpose

This change includes some restructuring of the homepage partials, to aid with the visibility of the section parameters and to put them all in one place.

Why

Homepage tracking was not reporting correct indexes.

Visual changes

None.

Trello card: https://trello.com/c/1bYIU8oP/674-fix-any-issues-caused-by-homepage-changes-indexes

- each part of the homepage when tracked should include an index section (the index of the section) and an index section count (the total number of sections, currently 6)
- sections were recently reordered, which caused the tracking to report incorrect numbers
- restoring these numbers as partial variables passed from the main index template, to help highlight their existence and purpose
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3784 October 2, 2023 12:56 Inactive
@andysellick andysellick force-pushed the ga4-homepage-indexes branch from b99c08b to 09c408f Compare October 2, 2023 12:58
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3784 October 2, 2023 12:59 Inactive
@andysellick andysellick force-pushed the ga4-homepage-indexes branch from 09c408f to 0f716bb Compare October 2, 2023 12:59
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3784 October 2, 2023 13:00 Inactive
Copy link
Contributor

@patrickpatrickpatrick patrickpatrickpatrick left a comment

Choose a reason for hiding this comment

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

Looks good. Will make it easier to prevent this happening again in future.

@andysellick andysellick requested a review from AshGDS October 2, 2023 13:21
@andysellick andysellick marked this pull request as ready for review October 2, 2023 13:21
- we recently modified the GA4 code so that we no longer have to mirror the structure of the GA4 schema when passing data via attributes, the JS identifies each attribute and places it in the correct place in the schema automatically
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3784 October 2, 2023 14:19 Inactive
@andysellick andysellick merged commit dbfd4ca into main Oct 2, 2023
7 checks passed
@andysellick andysellick deleted the ga4-homepage-indexes branch October 2, 2023 14:22
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.

4 participants