Lesson 1 of 5
Meta Pixel
① Connect your GTM container
Paste your container ID to load it into this page. It only ever runs here.
Advanced: use a specific environment
Meta ships an official GTM template, so you rarely need Custom HTML. Install it, fire the base PageView on all pages with your Pixel ID, then map standard events from the GA4 ecommerce dataLayer you already built.
You'll send a Purchase standard event off your purchase dataLayer push, carrying value and currency.
Goal
Install Meta's Pixel template and map a Purchase event from your dataLayer.
Build it in GTM
Install the Meta Pixel, official GTM template
From the Community Template Gallery (or built-in). ID required:Pixel ID.Install Meta's official Pixel template from the Community Gallery.
Fire the base / PageView on All Pages with your Pixel ID.
Map standard events (Purchase, Lead, AddToCart) from your GA4 ecommerce dataLayer.
Consider the Conversions API (CAPI) via server-side GTM for resilience.
Fire it on a Custom Event trigger for
purchaseAdd a Custom Event trigger onpurchaseand fire the Meta (Facebook) tag on it, passing value and currency where relevant.Go deeper
Browse ready-made, Google-approved options: DumbData: free GTM custom templates (client + server-side).
Debug in Tag Assistant
Copy this lesson's live URL and paste it into GTM Preview, that is the page Tag Assistant connects to. It has the clickable elements, so this page stays clean for reading.
- In your GTM, click Preview.
- Paste the live URL above and click Connect.
- Interact with the live page and watch your tag fire in Tag Assistant.
What you should expect to see
purchase fires the Meta Pixel's Purchase event in Tag Assistant.Verify your container
Built it? Export your container, Admin → Export Container, choose your workspace, then drop the JSON here to check it against this lesson.
Drop your container .json here
or browse · checked in your browser, nothing is uploaded