Hi, If i want to hardcode a CMP in shopfiy - like cookiebot or whatever , to make it parse consent signals into the sandbox, i would need to write custom code in custom pixels, right?
why don’t you just fire CMP from GTM, that way anywhere it’s embedded it will work, including the sandbox?
If for some reason you don’w want it in GTM, then you need to add CMP code to
a) theme.liquid for pre-checkout
b) SAME custom pixel where your GTM is for checkout and ty-page
I know it will work out of the box in GTM, but wouldnt it be “best / better practice” to hardcode for edge cases, if GTM gets blocked / whatever can happen?
Your consent banner may also be blocked by an ad blocker, so there is no difference between adding it to the code or to GTM.
In the case of Shopify, this only adds additional complexity to transferring consent to the correct sandbox if it works separately.