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