Skip to content
🚀 Find us on Product Hunt

X (Twitter) Pixel Tracking Setup for GoHighLevel

Quick answer: Use the free container builder wizard to select X (Twitter) Pixel and your events, enter your tracking ID, then import the generated file into Google Tag Manager - no manual tag setup needed for any of the 5 events below.

X Pixel base code and standard events, generated as Custom HTML. This platform does not have a native GTM tag type, so the container wraps its base code in a Custom HTML tag.

Build my X (Twitter) Pixel container →

Events you can track

conversion events

engagement events

By Humayun Kabir Naim — Last updated: 9 November 2026

Quick answer

This is the lightest hub on the site, and it starts with the question the others don't ask: do you actually run X (Twitter) ads to these funnels? If not, skip this setup entirely — a pixel with no ad spend behind it collects nothing useful, and adds a script and a consent surface to every page. If you do, the build is short: install GTM once per funnel or website — Sites → Funnels (or Websites) → Settings, head snippet in Head tracking code, body snippet in Body tracking code — put the X Pixel base code on every page through GTM, and fire lead events from the small Custom HTML "bridge" tags that hear each form, survey and calendar announce success. The one mechanical difference from the other platforms: X events are not fired by name. Each event you define in X's Events Manager gets its own event ID, and the GTM tag calls twq('event', '<that ID>'). Copy those IDs exactly — they are issued, not constructed. Two traps, both familiar: the pixel at funnel level and page level, and events fired on clicks instead of bridge success events.

What gets tracked

Five events — the same small surface as every GoHighLevel hub, mapped to the X events you define in Events Manager.

GoHighLevel actionHow GTM sees itX event
Page ViewGTM's own Page View trigger — no bridge neededBase pixel — page views for audiences and the signal events build on
Form SubmissionBridge tag listening for the form's native success messageLead-type event (its own ID from Events Manager)
Survey CompletedBridge tag listening for the survey's completion messageThe same lead event, or a second event if surveys are your qualification step
Calendar BookingBridge tag listening for the booking widget's completion messageBooking/lead-type event (its own ID)
Thank-You Page ViewPage View trigger limited to the thank-you stepFallback route only — read the warning below

Four of the five need a bridge: forms, surveys and calendars run inside embedded widgets the parent page cannot see into. The widget announces success to the parent page; the bridge turns that into a dataLayer.push the X event tag fires on. Page View needs none — the base pixel handles it.

The thank-you row is an alternative to the form event, never an addition: fire both and every lead counts twice, and X offers no merge to undo it. No ecommerce here. The free tier covers up to 3 events per container; the full container carries all five. See all options on the GoHighLevel hub.

Who should skip this (and the server-side honesty note)

Skip it if no X ads point at these funnels — today, or in a plan someone has actually approved. "We might try X later" is not a reason to ship a tracker now; install it the week the first campaign is briefed, when you can test against real clicks.

And one piece of candour, because the other hubs make a point of their server-side stories: X does offer a Conversions API, but wiring it into GoHighLevel means custom server work — no native GHL route, no server-container pattern comparable to Meta's. For nearly every GHL setup, browser-only is the whole story here. If X spend ever grows until that becomes the bottleneck, it is a bespoke project, not a hub page.

Before you start

  1. An X Ads account with a pixel created in Events Manager. Creating the pixel gives you the Pixel ID for the base code; creating each event there gives you the per-event IDs Route 2 needs. No Events Manager access, no setup — the IDs cannot be invented.
  2. Install per location. Funnels and their Settings tabs live inside each GoHighLevel sub-account (location). Repeat per client location, with that location's container and Pixel ID.
  3. Access to the funnel Settings tab, plus a deletable test submission and booking.
  4. Check for an existing manual install. A hand-pasted X base code in the tracking fields alongside the GTM one doubles every event. Search first.
Lead event and its issued event ID in X Events Manager

Route 1: Use the free TagManagerBuilder container

Open the GTM Container Builder, choose GoHighLevel, then X (Twitter) Pixel, tick the events, enter your Pixel ID, and download the JSON. In GTM, use Admin → Import Container with Merge → Overwrite conflicting tags, triggers, and variables. The container holds the base pixel (Custom HTML), the bridge tags, their triggers, and one event tag per event with a placeholder event ID — replace each placeholder with the real ID copied from Events Manager. You still install GTM on the funnel (Step 1) and test before publishing.

Route 2: Build it manually in GTM

Step 1 — Install GTM once, at funnel level

In GoHighLevel: Sites → Funnels (or Websites) → open the funnel → Settings tab. Paste GTM's <head> snippet into Head tracking code and the <body> snippet into Body tracking code, then Save. The per-page Tracking Code fields are for single-step scripts — installing at both levels loads the container twice and doubles every X event. GHL injects scripts dynamically, so GTM usually won't appear in View Page Source; judge it in GTM Preview and the X Pixel Helper.

GoHighLevel funnel Settings with GTM code in the Head and Body tracking code fields

Step 2 — The X Pixel base code

Tags → New → Custom HTML, with your Pixel ID (dummy o1234 here):

<script>
  !function(e,t,n,s,u,a){
    e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments)},
    s.version='1.1', s.queue=[], u=t.createElement(n), u.async=!0,
    u.src='https://static.ads-twitter.com/uwt.js',
    a=t.getElementsByTagName(n)[0], a.parentNode.insertBefore(u,a))
  }(window,document,'script');
  twq('config', 'o1234');
</script>

Trigger: All Pages. This loads the twq function and registers your pixel on every step — page views for audiences, and the foundation the event tags call. If a pasted base code already lives in the tracking fields, remove it.

X Pixel base code in a GTM Custom HTML tag for a GoHighLevel funnel

Step 3 — The bridge tags

One Custom HTML tag per conversion type, each listening for the widget's success message and pushing a named event:

<script>
  window.addEventListener('message', function(e) {
    var origin = e.origin || '';
    if (origin.indexOf('forms.gohighlevel.com') === -1 &&
        origin.indexOf('forms.msgsndr.com') === -1) { return; }
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({ event: 'goHighLevelFormSubmission' });
  });
</script>

Name it for what it hears (GHL — Form Bridge), trigger All Pages or only the form steps. The survey and calendar bridges follow the same shape. As on every GHL hub: this listener is a practitioner-community technique, not an official GoHighLevel API — the widgets' messages are not a documented contract, so the listener checks origins and the Test section is not optional.

Step 4 — Event tags with their Events Manager IDs

First, in X's Events Manager, define the events you need — a lead event for submissions, one for bookings — and copy each event's ID. The IDs follow a pattern built from your pixel ID plus an event-specific suffix (illustratively, tw-o1234-a1b2c); treat that shape as an example only. The exact ID is whatever Events Manager shows you — copy it character for character, never assemble it yourself: a hand-built ID that matches nothing is a tag firing into the void. (Flagged honestly: X has renamed its ad tools more than once — if your Events Manager shows a different format, the format on your screen wins.)

Then, in GTM, for each bridge event: a Custom Event trigger matching the pushed name exactly, and a Custom HTML tag on it:

<script>
  twq('event', 'tw-o1234-a1b2c', {});
</script>

One tag per event, each with its own ID. The discipline from the other hubs applies unchanged: fire on the bridge's success events, never on submit-button clicks — a click is an intention, the bridge event is the completed fact. The thank-you fallback, if a funnel needs it: one event tag on a Page View trigger limited to the thank-you step, with that funnel's form event tag paused.

X event tag in GTM firing the lead event ID on the form bridge event

Test it

GTM Preview showing the X lead tag fired on the form bridge event
  1. Click Preview in GTM and connect to the funnel — the container loading at all is your install check.
  2. Submit the test form. The bridge event (goHighLevelFormSubmission) appears in the Preview timeline with the X lead tag under Tags Fired — once.
  3. With the X Pixel Helper open, repeat the submission: it should show the base pixel and the event firing with the ID you copied. An ID the helper flags or Events Manager never receives is a copy error — re-copy, don't re-type.
  4. Complete a test booking and confirm its event the same way.
  5. In Events Manager, confirm the events register against the right pixel. Allow reporting time; it is not real-time like Preview.
  6. Publish (Submit), then delete the test contacts.
X Pixel Helper showing the base pixel and lead event on a GoHighLevel funnel

GoHighLevel-specific troubleshooting

Every event counts twice. The base code exists twice — pasted in the tracking fields and loaded by GTM, or the container at both funnel and page level. One base pixel per page: remove the paste or the page-level install.

The event tag fires in Preview but Events Manager shows nothing. An ID problem, in order of likelihood: the ID was typed or assembled instead of copied, so it matches no defined event; the event was defined under a different pixel than the base code carries; or reporting hasn't caught up — check the helper first, then re-copy the ID and compare.

The calendar is embedded on a WordPress page and nothing fires. GTM and the bridge live wherever the widget is embedded — the booking announces itself to the host page, so the host page's container must hold bridge and event tag. A container that only exists inside GHL's funnels sees nothing of a booking completed on your WordPress site.

Next: the same bridge pushes already feed GoHighLevel + GA4 and GoHighLevel + Meta — build those too, so every platform reports the same leads.

Frequently asked questions

Should I install the X Pixel if I don't run X ads?

No. With no X spend behind it, the pixel builds no usable audiences, reports no conversions anyone reads, and still costs you a script on every page plus another tracker to disclose in your privacy policy. Install it when the first X campaign is actually planned — setup takes an afternoon, and the bridges it needs will likely already exist.

Where do the event IDs come from?

From X's Events Manager, where each event you define is issued its own ID. The GTM event tag calls twq('event', '<id>') with exactly that ID. The IDs follow a pattern based on your pixel ID, but they are issued, not constructed — copy them from Events Manager character for character.

Is there a server-side setup for X on GoHighLevel, like Meta's CAPI?

Not a practical one. X offers a Conversions API, but there is no native GoHighLevel route to it and no server-container pattern comparable to the Meta build — wiring it up is custom development. For GHL funnels, browser tracking via GTM is the realistic scope.

Why fire events on the bridge instead of the submit button?

Because the button records intention and the bridge records completion. Clicks include abandoned forms, failed validation and double-taps; the bridge fires only when the widget announces a finished submission or booking.

Do I install the pixel once per agency or per client?

Per client location. Funnels and tracking fields live inside each GoHighLevel sub-account, and each client's X ads run under their own pixel. One install per location, with that client's container and Pixel ID.

Can I build audiences from funnel visitors who never submitted?

Yes — the base pixel's page views feed audiences in X's tooling, so you can retarget step viewers who never converted. The hub's caveat applies: audiences are only worth building if campaigns will actually run against them.

Share with