Cookie banner for an online store
A consent banner for a store that runs GA4, Google Ads and Meta Pixel. It passes the decision to Google Consent Mode v2 and the dataLayer; tags pasted into your pages must be set to wait for it.
How to set it up
An online store usually runs more trackers than any other kind of site: GA4, a Google Ads conversion tag, Meta Pixel, sometimes TikTok or a remarketing tool. The customer just wants to buy shoes, and you need their consent to measure which campaign brought the order. The banner shows “Accept” and “Reject” with equal weight, and “Settings” separates analytics from marketing. The most important setup step is outside the banner: in Google Tag Manager enable consent mode for your tags and set triggers so Pixel and ad tags wait for marketing consent. The banner does not block scripts pasted into your store theme and does not make the store compliant by itself — it passes the decision on. After setup, use GTM preview mode to check that ad tags do not fire after “Reject”.
Will the banner block a Meta Pixel pasted into my store theme?
Not by itself. Pasted Pixel code runs immediately unless you move it to GTM with a trigger that waits for marketing consent, or add it through ClickMeMaybe.
Will the basket still work after “Reject”?
The banner does not delete your store’s cookies. Basket and login rely on your platform’s essential cookies; rejecting applies to the analytics and marketing categories.