GTM Shared event settings

Posted by: Josh Quenga Date Posted: December 19, 2023
Back to Case Studies

Issue

  • the user lands on a landing page with a particular query parameter that the client wanted to view in events later in the funnel
  • without an easy way to do this, you would have to somehow save that to cookies/localStorage and then pull it later when the event occurred

Solution

  • here comes Shared event settings from the Google Tag!!
    • we set these here and these retain through the whole user session + pull through to all corresponding GA4 events
    • so now, if the landing page is many pages or events before the particular event we want the variable, it will still retain from the original time it was captured
  • don’t forget to add these as custom dimensions in your GA4 property afterwards!

Achievement

  • retained a custom event parameter throughout all events from a user

Snippet/Screenshot/Link