Why is Google Tag Manager causing errors on my checkout page?

Shopify Partner
2 0 3

Hello everyone. We are trying to set up some web pixels using Google Tag Manager using the new "Customer Events" functionality of Shopify on a store already in the new checkout. However, we are getting an error only happening on the checkout page. As soon as the script is executed, it returns this: Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame. I'm attaching a screenshot of the error for full context.


Any idea of why this might be happening? If I remove the GTM script, everything works fine. So it must be something related to the external script. I'll appreciate any help, thanks in advance!




Replies 4 (4)

Shopify Partner
5 0 3

I am having the same issue. Has anyone found a solution to this yet? I have attempted to move the GTM tag outside of the pixel section and it doesn't read the datalayers. Very frustrating.

1 0 1

I am facing same issue, did any found any solution?

Very frustrating. Please help 

Shopify Partner
2 0 1

Receiving the same error. I have seen in some non-Shopify forums that window.postMessage() may be a solution, but I am not sure if or how that can be implemented here. Is anyone able to assist?

14 0 15

I'm having a similar issue. I followed these instructions to set up my tracking pixel using Customer Events:

but when I try to preview in GTM, I see an error in the browser console and preview tells me it can't find the pixel. When I view source, I see the pixel code is there. I'm surprised we'd be shown an implementation that doesn't quite work.

Uncaught DOMException: Failed to set a named property 'debugBadgeApi' on 'Window': Blocked a frame with origin "null" from accessing a cross-origin frame.