Lesson 4 of 5
X (Twitter) 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
X (formerly Twitter) uses the Pixel / Universal Website Tag. Install the base on all pages with your Pixel ID, then fire conversion events on your conversion triggers.
You'll fire a conversion off your purchase event.
Goal
Install the X Pixel and fire a conversion on purchase.
Build it in GTM
Install the X Pixel / Universal Website Tag
From the Community Template Gallery (or built-in). ID required:Pixel ID.Install the X Pixel template (or Universal Website Tag), base on All Pages.
Add your Pixel ID.
Fire conversion events on your conversion triggers.
Fire it on a Custom Event trigger for
purchaseAdd a Custom Event trigger onpurchaseand fire the X (Twitter) 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 X conversion 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