Expand my Community achievements bar.

Join expert-led sessions on Real-Time CDP & Journey Optimizer designed to boost your impact.

Issue with page views and other analytics data not capturing relating to consent banner

Avatar

Level 4

The problem: when visitors first come to our site, with no cookie banner interaction, the initial page view and some other analytics data items are not getting captured or tracked. This seems to be because the GPLR happens on a “window loaded” event type which needs the adobedtm tag to load instantly. Well the adobedtm tag is blocked until a user consents to analytics cookies. So if the banner is accepted, but the GPLR has already been triggered, almost nothing is tracked on that first page view.

 

My potential fix, that did work to some extent, was to add another GPLR that used custom Javascript which would add an event listener to the cookie banner’s acceptance. If the banner was accepted or analytics were accepted on that first page view, then the GPLR would basically refire. This worked flawlessly with my testing. But when things were published to Production, we saw a different outcome. My only guess to this would be variances to certain users with slower internet speeds and the 2nd GPLR not getting recognized or firing in time. I attempted to enhance the script with some timeout delays to account for this, but nothing seemed to match the outcome of what I was experiencing of my personal testing of the new addition.

 

What are recommended approaches to making sure all data is captured on that first page view, after a user has accepted cookies?

2 Replies

Avatar

Level 4

Hi @mmasonWD 

Configure the tag to load immediately after consent is granted, prioritizing its activation and Use an event listener on the cookie banner to trigger analytics tracking with initial page context upon consent acceptance.

Avatar

Administrator

@mmasonWD Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni