Skip to content

Move GTM id from env to wagtail settings, and add experimental secondary GTM id#427

Open
helenb wants to merge 1 commit intomainfrom
spike/experiment-with-double-GA-container
Open

Move GTM id from env to wagtail settings, and add experimental secondary GTM id#427
helenb wants to merge 1 commit intomainfrom
spike/experiment-with-double-GA-container

Conversation

@helenb
Copy link
Copy Markdown
Member

@helenb helenb commented Apr 7, 2026

Description of Changes Made

Request via slack to add a secondary GTM container. Advice seems to be mixed about whether this is a good idea, and whether the dataLayer should be renamed if a second container is used. Putting this on staging so that Olly can experiment.

How to Test

Screenshots

Expand to see more

MR Checklist

  • Add a description of your pull request and instructions for the reviewer to verify your work.
  • If your pull request is for a specific ticket, link to it in the description.
  • Stay on point and keep it small so the merge request can be easily reviewed.
  • Tests and linting passes.

Unit tests

  • Added
  • Not required

Documentation

Browser testing

  • I have tested in the following browsers and environments (edit the list as required)
    • Latest version of Chrome on mac
    • Latest version of Firefox on mac
    • Latest version of Safari on mac
    • Safari on last two versions of iOS
    • Chrome on last two versions of Android
  • Not required

Data protection

  • Not relevant
  • This adds new sources of PII and documents it and modifies Birdbath processors accordingly

Light and dark mode

  • I have tested the changes in both light and dark mode
  • The change is not relevant to dark and light mode

Accessibility

  • Automated WCAG 2.1 tests pass
  • HTML validation passes
  • Manual WCAG 2.1 tests completed
  • I have tested in a screen reader
  • I have tested in high-contrast mode
  • Any animations removed for prefers-reduced-motion
  • Not required

Sustainability

  • Images are optimised and lazy-loading used where appropriate
  • SVGs have been optimised
  • Performance and transfer of data considered
  • If JavaScript is needed alternatives have been considered
  • Not required

Pattern library

  • The pattern library component for this template displays correctly, and does not break parent templates
  • The styleguide is updated if relevant
  • Changes are not relevant the pattern library

@helenb helenb requested a review from engineervix April 7, 2026 11:22
Copy link
Copy Markdown
Member

@engineervix engineervix left a comment

Choose a reason for hiding this comment

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

Thanks @helenb I've reviewed the changes and they look good to me.

Just a thought (non-blocking) on the template, I wonder whether it'd make sense to create a template include for the GTM markup, so that it's defined in one place and we don't repeat ourselves. Then we'd just pass the tag manager ID when including it.

@helenb
Copy link
Copy Markdown
Member Author

helenb commented Apr 7, 2026

Thanks @helenb I've reviewed the changes and they look good to me.

Just a thought (non-blocking) on the template, I wonder whether it'd make sense to create a template include for the GTM markup, so that it's defined in one place and we don't repeat ourselves. Then we'd just pass the tag manager ID when including it.

Good idea!

@helenb
Copy link
Copy Markdown
Member Author

helenb commented Apr 7, 2026

Thanks @helenb I've reviewed the changes and they look good to me.
Just a thought (non-blocking) on the template, I wonder whether it'd make sense to create a template include for the GTM markup, so that it's defined in one place and we don't repeat ourselves. Then we'd just pass the tag manager ID when including it.

Good idea!

I might leave for now, till we know whether we want to rename the dataLayer or not for the second tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants