Advertising > Pixels & Tags
Google Tag Manager
Install GTM, choose the right SuperFunnel event streamer, and fire tags on conversion events.
Overview
Google Tag Manager (GTM) is a free tool that lets you add and manage tracking tags, like the Meta Pixel, Google Ads conversion tags, or analytics snippets, without editing your page code every time. You install one container on your pages, then add and change tags from the GTM dashboard.
If you only ever need a single pixel, you can paste it straight into Custom Code and skip GTM. GTM earns its place once you are juggling several tags, want to map SuperFunnel events to platform-specific conversions, or want marketers to manage tracking without touching the funnel.
Three concepts make up every GTM setup:
- Tag — the code that runs, such as a Google Ads conversion or a Meta Pixel
Leadevent. - Trigger — the condition that fires a tag, such as a page view, button click, time spent watching a YouTube video, or any other custom event you define.
- Variable — a reusable value a tag or trigger can read.
Before you start
You need a Google Tag Manager account and a Web container. Create one for free at tagmanager.google.com. Have at least Edit and Publish permissions on the container.
Step 1: Get your container snippet
Create or open a Web container
In Google Tag Manager, create a new Web container (or open an existing
one). Each container has an ID in the form GTM-XXXXXXX.
Copy the install code
Open Admin → Install Google Tag Manager. GTM shows two snippets: one for
the <head> and one for the <body>. Copy both.
Step 2: Install GTM in SuperFunnel
Add the container globally using Custom Code. Enable for relevant pages and quizzes, then publish.
Open global Custom Code
Go to Settings → Website → Custom Code.
Add the head snippet
Click + Add Code, name it "GTM Container — Head", paste the <head>
snippet, and set the injection location to Header. Enable it.
Add the body snippet
Add a second snippet named "GTM Container — Body", paste the <body>
snippet, and set the injection location to Body.
Save and publish your pages
Save your changes so the container goes live on your pages.
Wait
Add a 1 ms delay to your snippets so they run after page elements render. See Custom Code for details.
Confirm the container loads
Open a live page, then check Preview mode in GTM (see Step 5). If the container connects, GTM is installed correctly.
Step 3: Choose a SuperFunnel event streamer
Installing a GTM container lets you run Google Ads, Meta Pixel, and other tags. A SuperFunnel event streamer has a separate job: it sends selected GTM events back to SuperFunnel analytics and associates them with the visitor session that produced them.
You only need an event streamer when GTM owns events that should also appear in SuperFunnel. If you use GTM only to fire ad-platform tags from SuperFunnel's built-in events, skip to Step 4.
Choose one template
| Template | Container | Use it when | Attribution behavior |
|---|---|---|---|
| Legacy Web | Web | You already use the original SuperFunnel streamer and need to keep its existing collector contract. Do not choose it for a new installation. | Reads click IDs from the current URL and sends the current data layer event. |
| Web v2 | Web | A Web container should send explicitly selected events to SuperFunnel. This is the default choice for a new browser-side setup. | Reads click IDs from the URL, a one-day first-party _sf_click_ids cookie, or configured GTM variable overrides. |
| Server v2 | Server | Your events already flow through a Server GTM container and should be correlated there. | Reads Common Event Data, page_location, configured overrides, and cookie fallback. It also accepts existing SuperFunnel session and visit identifiers. |
Do not stream the same event twice
Choose Web v2 or Server v2 for each event path. If both tags send the same event, SuperFunnel receives a duplicate. Keep Legacy Web only for an existing installation until you deliberately migrate it.
Download the templates
These files are published directly from the canonical SuperFunnel application repository:
Legacy Web
Download the compatibility template for an existing Web GTM installation.
Web v2
Download the strict v2 template for a Web GTM container.
Server v2
Download the strict v2 template for a Server GTM container.
Import a template into GTM
Open the matching container
Open the Web container for Legacy Web or Web v2. Open the Server container for Server v2.
Import the template file
In GTM, open Templates → Tag Templates → New. In the template editor,
open the actions menu, choose Import, and select the downloaded .tpl
file. Review the requested permissions, then click Save.
Create the streamer tag
Open Tags → New → Tag Configuration, then select the imported SuperFunnel template. Configure the fields described below and attach only the event triggers you intend to stream.
Configure Web v2
- Leave Custom Event Name empty to use the current data layer event name, or enter a fixed replacement.
- Add only the Event Properties SuperFunnel needs. Do not send names, email addresses, phone numbers, or other personal data.
- The tag reads supported click IDs from the current URL automatically. Under Attribution, map GTM variables only when those values are stored somewhere else.
- To capture a landing-page click ID before navigation, the same tag can also fire on an Initialization trigger. Initialization captures attribution but does not send an event.
- The tag writes
_sf_click_idsfor one day withSameSite=Laxand respectsad_storageconsent.
Configure Server v2
- Leave Custom Event Name empty to use
event_namefrom Common Event Data. - Add only the Event Properties SuperFunnel needs. Do not send personal data.
- The tag automatically checks top-level Common Event Data and query parameters in
page_locationfor supported click IDs. - Under Attribution → Identifier Overrides, map a GTM variable when the identifier has another name. For example, map a
{{subid}}variable toshortVisitHash. - Leave Advanced → Collector API URL empty in production. That field is only for an approved testing endpoint.
- Fire the tag only after the Server GTM client has produced the Common Event Data needed by the tag.
Supported identifiers
Both v2 templates support these advertising click IDs:
gclid, fbclid, msclkid, ttclid, li_fat_id, epik, twclid, sclid, tblci, ob_click_id, and rdt_cid.
Server v2 also supports these existing SuperFunnel identifiers:
hash, sessionHash, sessionId, visitHash, shortHash, shortSessionHash, and shortVisitHash.
An identifier is required
A v2 streamer can only associate an event with a SuperFunnel session when at least one supported identifier is present. SuperFunnel uses the newest matching session recorded within the previous 24 hours. If GTM Preview shows the tag as failed, inspect the event data and the configured overrides first.
Step 4: Fire an ad-platform tag on a SuperFunnel event
SuperFunnel emits an event when a visitor submits a form, that is, reaches the final step of a quiz or form. You catch that event in GTM with a Custom Event trigger, then fire whatever tag you want.
This ad-platform tag is independent of the optional SuperFunnel event streamer in Step 3. Both can use the same Custom Event trigger because they send the event to different destinations.
The two examples below use the same trigger; only the tag differs, and you do not need both. Example A (Google Ads) is the most common setup, and it does not involve Meta or the Pixel at all. Use Example B only if you also advertise on Meta.
Two default events to choose from
SuperFunnel emits two built-in events you can use as the Custom Event trigger:
superfunnel-form-submission (the visitor reached the Final Step) and the
broader superfunnel-conversion (any conversion, including click-outs). The
examples below use superfunnel-form-submission. If your funnel converts before
the final step, swap in a custom event.
See Default conversion events.
Create the trigger (shared)
Both examples reuse this one trigger. Create it once.
Create a Custom Event trigger
In GTM, go to Triggers → New.
- Trigger type: Custom Event
- Event name:
superfunnel-form-submission - Name it "SuperFunnel Form Submission" and save.
Example A: Form submission → Google Ads conversion
If you advertise on Google, get Conversion ID and Conversion Label from Google Ads.
Create the tag
Go to Tags → New and name it "GAds — Popup Form Submission".
- Tag type: Google Ads Conversion Tracking
- Conversion ID: your Google Ads Conversion ID
- Conversion Label: your Google Ads Conversion Label

Attach the trigger
Under Triggering, select the "SuperFunnel Form Submission" trigger, then save the tag.
Submit and publish
Click Submit in the top right to publish the container so the tag goes live.
Example B: Form submission → Meta Lead
If you run Meta ads and want the submission to count as a standard Meta Lead event, follow this example. It assumes the Meta Pixel base code is already installed on your pages, see Meta Pixel.
Restricted industries
Meta blocks the standard Lead event for advertisers it categorizes as
handling personal health information or operating in other sensitive
industries. If that applies to you, fire the submission as a custom event
instead, fbq('trackCustom', 'superfunnel-form-submission'), and optimize
your campaign for that custom conversion. See the
restricted industry warning
in the Meta Pixel doc.
Create the tag
Go to Tags → New and name it "SuperFunnel Form Submission → Meta Lead".
- Tag type: Custom HTML
- Paste the Lead event code:
<script>
fbq('track', 'Lead');
</script>To attach a value for revenue reporting, add it inline. Here is an example where the lead is worth $25 USD:
<script>
fbq('track', 'Lead', { value: 25.0, currency: 'USD' });
</script>Attach the trigger
Under Triggering, select the "SuperFunnel Form Submission" trigger, then save the tag.
Submit and publish
Click Submit in the top right to publish the container so the tag goes live.
Step 5: Test and verify
Open GTM Preview
In GTM, click Preview, enter your live page URL, and connect. A debug panel opens alongside your page.
Trigger the event
Complete and submit the form on the page. In the GTM debug panel, confirm the
superfunnel-form-submission event appears and your tag fires.
Check the event streamer, if installed
Confirm the SuperFunnel streamer fires once. Web v2 and Server v2 report a failure when the payload is invalid, no supported identifier is available, no related session is found, or delivery fails.
Confirm in the ad platform
- Google Ads (Example A): open Goals → Conversions and check the conversion registers. It can take time to appear.
- Meta (Example B): open Events Manager → Test Events, refresh, and confirm the Lead event arrives after you submit the form.
Done
When your tag fires once in GTM Preview with no duplicates and the conversion shows up in the ad platform, the setup is working and you can use it in your campaigns or ad sets.
Streamer troubleshooting
- The v2 tag fails immediately — Confirm the event has a supported click ID or, for Server v2, a supported SuperFunnel identifier. Check the tag's Attribution overrides for an empty or incorrectly mapped variable.
- The event appears twice — Web v2 and Server v2 are probably firing for the same event. Disable one delivery path.
- Initialization succeeds but no event appears — This is expected. Web v2 uses Initialization only to persist attribution; attach the conversion trigger to send the actual event.
- No event is sent when consent is denied — This is expected. The v2 templates respect
ad_storagedenial. - An existing Legacy Web tag works — Leave it in place until you plan and test a migration. Do not replace it only to rename the template.
What's next
Debugging Events
Inspect the page-load dataLayer event and fix the most common tag pitfalls.
Meta Pixel
Install the Pixel and learn how SuperFunnel events map to standard events.
Online Event Tracking
Fire your own on-page events with the SuperFunnel JavaScript API.
Offline Conversion Tracking
Report backend conversions to Meta and Google for server-side accuracy.
Custom Code
Where and how to inject scripts into your pages and quizzes.