Skip to main content

Cookie Craft

Load Meta Pixel only when advertising consent allows it

Meta Pixel should not start simply because the page loaded. Cookie Craft checks advertising consent first, then loads the Pixel directly — or lets you manage it through GTM without duplicate installations.

What Meta Pixel is, and why the loading moment matters

The Meta Pixel is the browser-side code that sends events from your website to Meta. It measures the results of Facebook and Instagram ads, builds audiences, and optimises delivery towards people more likely to convert. Precisely because it can set cookies and transmit marketing events, the base code must not be allowed to fire before consent where consent is required — a hardcoded pixel that runs on page load is the common mistake.

What Cookie Craft does

Direct integration through a Pixel ID — no custom loader, no hand-written consent logic.

First visit, no consent

The Meta base code is not loaded. There is no Pixel that “already fired” before the banner was used.

After advertising consent

The Pixel base code (and its PageView) is inserted dynamically once advertising consent exists. Advanced or custom events are configured separately, in GTM or your site code.

Return visit with valid consent

Cookie Craft reads the existing choice and loads the Pixel early, so permitted measurement is not needlessly delayed.

Direct or through GTM — never both

Enter the Pixel ID in one place: Cookie Craft directly, or GTM. Installing it in both sends two PageViews and two sets of events, inflating your numbers. If you manage the Pixel in GTM, leave the direct Cookie Craft field empty and confirm the tag does not fire without advertising consent. Check the theme, platform plugins and any old integration for a pixel that was installed long ago.

When a visitor withdraws consent, Cookie Craft stops new Pixel loads and events; a Pixel already loaded on the current page stops receiving new events, and the change takes full effect on the next page load.

Events that fit

Site typeUseful Meta eventsNote
Lead generationPageView, ViewContent, Contact, LeadLead fires after form confirmation; Contact can describe phone/WhatsApp/email.
E-commerceViewContent, AddToCart, InitiateCheckout, PurchasePurchase includes value and currency; do not re-send on refresh.
Content / downloadViewContent, Lead or a justified custom eventUse a standard event where one exists; don’t invent sensitive event names.

No Meta base code before the relevant consent choice.

Direct Pixel ID for simple setups; GTM for advanced event models — never duplicated.