Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › How to track dynamic dataLayer values as custom dimensions in GA4 › Reply To: How to track dynamic dataLayer values as custom dimensions in GA4
-
Yes, you are on the right track. In GA4, the tracking model is event-based and no longer relies on sessions and pageviews like in Universal Analytics. There are no scoped dimensions in GA4, instead, all the data you want to track must be sent as an event parameter. It can be tedious to set up, but to track the dataLayer values as custom dimensions, you would indeed need to set up a GA4 event to trigger on every single pageview. You might consider streamlining this process if the dataLayer values are the same across multiple pages by setting up an event that sends the dataLayer value only when it changes. This way, you get the same data but reduce the number of events you trigger.