Subscribers Only
The full article plus 21 more subscriber-only posts come with a subscription.
Liquid metafields are unreachable inside the Shopify custom pixel sandbox. Use the cart attribute pattern to carry customer metafields into checkout pixel events and onward to Flow. Bridge consent state for correct enforcement in server-side events.
The Shopify custom pixel sandbox is an isolated JS environment and cannot reach customer metafields read from Liquid. The localStorage workaround the community recommends falls short on consent and cross-domain grounds. The bridge that works is the cart attribute: the value is written to the cart on the theme side, persists into checkout, and the pixel reads it there. Consent is handled on two separate layers, config and runtime.
The full article plus 21 more subscriber-only posts come with a subscription.