Systems Lab

Agent skill

gtm-conversion-setup-guide

This skill should be used when the user asks to \"set up conversion tags in GTM\", \"configure a Meta Pixel trigger\", \"debug a tag not firing\", \"add Google Ads conversion tracking in GTM\", or mentions \"GTM tag setup\", \"trigger conditions\", or \"LinkedIn Insight Tag\".

activeReaches the webInstructions only3,291 words

Filed under ABM and paid.

From Ad-Superpowers/ad-superpowers-plugin · 120 skills · 5 · pushed 2026-09-10

What it does when it runs

This skill should be used when the user asks to \"set up conversion tags in GTM\", \"configure a Meta Pixel trigger\", \"debug a tag not firing\", \"add Google Ads conversion tracking in GTM\", or mentions \"GTM tag setup\", \"trigger conditions\", or \"LinkedIn Insight Tag\". Do NOT use for: strategic tracking planning (use tracking-plan-builder), server-side tagging (use gtm-server-side-tagging-guide), or consent implementation (use gtm-consent-mode-guide).

Read from the skill and the 0 files bundled beside it. A skill’s own description is written to be selected by an agent, so it describes the job and not the dependencies.

Keys and connectors you must supply
None found.
Hosts it reaches
  • analytics.tiktok.com
  • connect.facebook.net
  • snap.licdn.com
Tool permissions it declares
No allowed-tools in the frontmatter. It only issues instructions, so there is nothing to bound.
Actions present in the files
None. Instructions only.

Ask about gtm-conversion-setup-guide

Opens your assistant with this page's verified links already in the prompt.

Is this safe to install?ClaudeChatGPT
Adapt it to my stackClaudeChatGPT
What else do I need for it to workClaudeChatGPT
Rather ask a human? Talk to Cheetah
git clone --depth 1 --filter=blob:none --sparse https://github.com/Ad-Superpowers/ad-superpowers-plugin.git /tmp/ad-superpowers-plugin
git -C /tmp/ad-superpowers-plugin sparse-checkout set "plugin/skills/gtm-conversion-setup-guide"
mkdir -p ~/.claude/skills/gtm-conversion-setup-guide
cp -R "/tmp/ad-superpowers-plugin/plugin/skills/gtm-conversion-setup-guide/." ~/.claude/skills/gtm-conversion-setup-guide/

Picked up without a restart. A project skill of the same name is shadowed by your personal one. For one repository only, swap ~/.claude/skills for .claude/skills. Claude Code docs ↗

Or take the whole library

This repo ships a .claude-plugin manifest, so Claude Code can install all 120 skills at once. Plugin skills are invoked as /<plugin>:<skill>, so they never collide with your own.

/plugin marketplace add Ad-Superpowers/ad-superpowers-plugin
/plugin

The folder is the same in every client that implements the format — 46 of them — so if yours is not above, only the destination changes.

Reproduced in full from Ad-Superpowers/ad-superpowers-plugin/blob/9b6385d2d2d228e4dac096a1d6bc5715c04fa736/plugin/skills/gtm-conversion-setup-guide/SKILL.md, which is licensed MIT (repository). 3,291 words, 55 headings.

GTM Conversion Setup Guide

This skill covers the tactical implementation of conversion tracking tags in Google Tag Manager. For each ad platform, you get the exact tag type, required fields, trigger configuration, and variable setup needed to make conversions fire correctly.

Prerequisites

Before implementing tags, ensure you have:

  • A GTM container installed on all pages (via <script> in <head>)
  • A tracking plan defining which events to implement (see tracking-plan-builder skill)
  • A data layer pushing events from your website code
  • Access to each ad platform's conversion/event configuration UI
  • GTM Preview mode familiarity (the debugger panel)

Use gtm_list_containers to verify your GTM containers and gtm_audit to see what is already configured.

Part 1: GA4 Tags

GA4 Configuration Tag (Google Tag)

This is the foundation. Every GA4 property needs exactly one Google Tag that loads on all pages.

SettingValue
Tag TypeGoogle Tag
Tag IDG-XXXXXXXXXX (your Measurement ID)
TriggerAll Pages (Page View)
Firing PriorityHigh (fires first)

Configuration Parameters (optional but recommended)

ParameterValuePurpose
send_page_viewtrueAuto page views (default)
debug_modetrue (dev only)Enables GA4 DebugView
user_id{{DLV - user_id}}Cross-device tracking
cookie_flagsSameSite=None;SecureCross-site cookie support

GA4 Event Tags

Create one GA4 Event tag per custom event or per standard event that needs extra parameters.

Purchase Event Tag

SettingValue
Tag TypeGoogle Analytics: GA4 Event
Measurement IDG-XXXXXXXXXX
Event Namepurchase
TriggerCustom Event: purchase

Event Parameters:

Parameter NameValue
transaction_id{{DLV - ecommerce.transaction_id}}
value{{DLV - ecommerce.value}}
currency{{DLV - ecommerce.currency}}
tax{{DLV - ecommerce.tax}}
shipping{{DLV - ecommerce.shipping}}
coupon{{DLV - ecommerce.coupon}}
items{{DLV - ecommerce.items}}

Generate Lead Event Tag

SettingValue
Tag TypeGoogle Analytics: GA4 Event
Measurement IDG-XXXXXXXXXX
Event Namegenerate_lead
TriggerCustom Event: generate_lead

Event Parameters:

Parameter NameValue
value{{DLV - value}}
currency{{DLV - currency}}
lead_type{{DLV - lead_type}}

Other Standard Event Tags

Use the same pattern for these events. Each gets its own GA4 Event tag:

EventTriggerKey Parameters
sign_upCustom Event: sign_upmethod
add_to_cartCustom Event: add_to_cartvalue, currency, items
begin_checkoutCustom Event: begin_checkoutvalue, currency, items
add_payment_infoCustom Event: add_payment_infovalue, currency, payment_type
add_shipping_infoCustom Event: add_shipping_infovalue, currency, shipping_tier
view_itemCustom Event: view_itemvalue, currency, items

Part 2: Google Ads Tags

Google Ads Conversion Tracking Tag

You need one tag per conversion action. Get the Conversion ID and Label from Google Ads > Goals > Conversions > your action > Tag setup.

SettingValue
Tag TypeGoogle Ads Conversion Tracking
Conversion IDAW-XXXXXXXXX
Conversion LabelXXXXXXXXXXXXXXXXXX
Conversion Value{{DLV - ecommerce.value}}
Currency Code{{DLV - ecommerce.currency}}
Transaction ID{{DLV - ecommerce.transaction_id}}
TriggerCustom Event: purchase

Conversion Linker Tag (Required)

This tag must fire on all pages for Google Ads conversion tracking to work. Without it, conversions from Google Ads clicks will not be attributed.

SettingValue
Tag TypeConversion Linker
TriggerAll Pages (Page View)
Enable linking across domainsCheck if multi-domain
Firing PriorityHigh (before conversion tags)

Enhanced Conversions Setup

Enhanced Conversions use first-party data (hashed email, phone) to improve attribution. Configure in the Google Ads Conversion Tracking tag:

SettingValue
Include user-provided dataCheck
Data sourceCode / Data Layer
Email{{DLV - user_data.email}}
Phone{{DLV - user_data.phone}}
First Name{{DLV - user_data.first_name}}
Last Name{{DLV - user_data.last_name}}
Street Address{{DLV - user_data.street}}
City{{DLV - user_data.city}}
Postal Code{{DLV - user_data.postal_code}}
Country{{DLV - user_data.country}}

Data layer push for Enhanced Conversions:

window.dataLayer.push({
  event: 'purchase',
  user_data: {
    email: '[email protected]',    // Will be hashed by GTM
    phone: '+31612345678',
    first_name: 'Jan',
    last_name: 'de Vries',
    street: 'Keizersgracht 100',
    city: 'Amsterdam',
    postal_code: '1015 AA',
    country: 'NL'
  },
  ecommerce: { /* ... */ }
});

Google Ads Remarketing Tag

SettingValue
Tag TypeGoogle Ads Remarketing
Conversion IDAW-XXXXXXXXX (same as conversion)
TriggerAll Pages
Custom ParametersSee below for dynamic remarketing

Dynamic Remarketing Parameters (E-Commerce):

ParameterValuePurpose
ecomm_prodid{{DLV - ecommerce.items.0.item_id}}Product ID for dynamic ads
ecomm_pagetype{{Page Type}}home/category/product/cart/purchase
ecomm_totalvalue{{DLV - ecommerce.value}}Cart/transaction value
ecomm_category{{DLV - ecommerce.items.0.item_category}}Product category

Part 3: Meta Pixel Tags

Meta Pixel Base Code (via Custom HTML Tag)

While Meta provides a GTM template in the Community Template Gallery, the Custom HTML approach gives you full control.

SettingValue
Tag TypeCustom HTML
TriggerAll Pages
Tag firing priority100 (fire early)
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '{{Meta Pixel ID}}');
fbq('track', 'PageView');
</script>

Alternative: Use the official "Meta Pixel" template from the GTM Community Template Gallery for a no-code setup.

Meta Standard Event Tags

Create a Custom HTML tag for each standard event, OR use the Community Template.

Purchase Event

SettingValue
Tag TypeCustom HTML
TriggerCustom Event: purchase
Tag SequencingFires after Meta Pixel Base Code
<script>
fbq('track', 'Purchase', {
  value: {{DLV - ecommerce.value}},
  currency: '{{DLV - ecommerce.currency}}',
  content_ids: {{DLV - ecommerce.content_ids}},
  content_type: 'product',
  num_items: {{DLV - ecommerce.item_count}}
});
</script>

Lead Event

<script>
fbq('track', 'Lead', {
  value: {{DLV - value}},
  currency: '{{DLV - currency}}',
  content_name: '{{DLV - lead_type}}'
});
</script>

Full Meta Standard Events Reference

Meta EventWhen to FireRequired Parameters
PageViewEvery page (in base code)None
ViewContentProduct/content page viewvalue, currency, content_ids, content_type
AddToCartItem added to cartvalue, currency, content_ids, content_type
InitiateCheckoutCheckout startedvalue, currency, num_items
AddPaymentInfoPayment info enteredvalue, currency
PurchaseOrder completedvalue, currency, content_ids, content_type
LeadLead form submittedvalue, currency
CompleteRegistrationAccount createdvalue, currency
SearchSearch performedsearch_string
ContactContact action takenNone

Meta Conversions API (Server-Side)

Meta Conversions API (CAPI) is mandatory for maintaining signal quality — client-side Pixel alone is no longer sufficient due to browser restrictions and iOS privacy changes. Implement both client-side (Pixel) and server-side (CAPI) for redundant event matching. The server-side component is covered in the gtm-server-side-tagging-guide skill. Key point: include an event_id parameter in both the Pixel event and the CAPI event for deduplication.

<script>
var eventId = 'evt_' + Date.now() + '_' + Math.random().toString(36).substr(2,9);
fbq('track', 'Purchase', {
  value: {{DLV - ecommerce.value}},
  currency: '{{DLV - ecommerce.currency}}'
}, {eventID: eventId});
</script>

Part 4: LinkedIn Insight Tag

LinkedIn Insight Tag Base Code

SettingValue
Tag TypeCustom HTML (or LinkedIn Insight Tag template)
TriggerAll Pages
Tag firing priority90
<script type="text/javascript">
_linkedin_partner_id = "{{LinkedIn Partner ID}}";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script>
<script type="text/javascript">
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
</script>

LinkedIn Conversion Events

LinkedIn conversions are configured in Campaign Manager, not in GTM. In GTM, you fire the insight tag event that LinkedIn maps to its conversion.

Event-Specific Conversion (recommended)

<script>
window.lintrk('track', { conversion_id: {{LinkedIn Conversion ID}} });
</script>
SettingValue
Tag TypeCustom HTML
TriggerCustom Event matching your conversion
Tag SequencingAfter LinkedIn Insight Tag base

URL-Based Conversion (alternative)

Configure in LinkedIn Campaign Manager:

  1. Go to Analyze > Conversions
  2. Create conversion using "Page load" trigger
  3. Set URL rule (equals, starts with, or contains your thank-you page URL)

No additional GTM tag needed -- the Insight Tag base code handles it.

Part 5: TikTok Pixel

TikTok Pixel Base Code

SettingValue
Tag TypeCustom HTML (or TikTok Pixel template)
TriggerAll Pages
Tag firing priority90
<script>
!function (w, d, t) {
  w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e};ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
  ttq.load('{{TikTok Pixel ID}}');
  ttq.page();
}(window, document, 'ttq');
</script>

TikTok Standard Event Tags

Purchase / CompletePayment Event

<script>
ttq.track('CompletePayment', {
  value: {{DLV - ecommerce.value}},
  currency: '{{DLV - ecommerce.currency}}',
  content_id: '{{DLV - ecommerce.items.0.item_id}}',
  content_type: 'product',
  content_name: '{{DLV - ecommerce.items.0.item_name}}',
  quantity: {{DLV - ecommerce.item_count}}
});
</script>

Full TikTok Standard Events Reference

TikTok EventWhen to FireKey Parameters
ViewContentProduct page viewcontent_id, content_type, content_name, value, currency
AddToCartItem added to cartcontent_id, content_type, value, currency, quantity
InitiateCheckoutCheckout startedvalue, currency
CompletePaymentPurchase completedcontent_id, content_type, value, currency, quantity
SubmitFormForm submittedcontent_name
CompleteRegistrationAccount createdcontent_name
ContactContact action--
SearchSearch performedquery
ClickButtonCTA clickedcontent_name
DownloadApp/file downloadcontent_name

Part 6: Triggers

Triggers determine WHEN tags fire. Choosing the right trigger type prevents misfires and missed events.

Trigger Type Decision Tree

What initiates the event?
|
+-- Page loads --------------------------------> Page View trigger
|   +-- Every page ----------------------------> All Pages
|   +-- Specific URL --------------------------> Page View + URL condition
|
+-- User clicks something --------------------> Click trigger
|   +-- Any link ------------------------------> Just Links (Click - All)
|   +-- Specific button/element ---------------> Just Links or All Elements + CSS selector
|
+-- Data Layer event fires --------------------> Custom Event trigger
|   (RECOMMENDED for most conversion events)
|
+-- Form is submitted -------------------------> Form Submission trigger
|   (GTM intercepts native form submits)
|
+-- Element becomes visible -------------------> Element Visibility trigger
|   (lazy-loaded content, scroll-into-view)
|
+-- Timer fires ------------------------------> Timer trigger
|   (engagement time tracking)
|
+-- DOM is fully parsed -----------------------> DOM Ready trigger
|   (when you need DOM but not all resources)
|
+-- Page fully loaded -------------------------> Window Loaded trigger
|   (when you need all images/scripts loaded)

Custom Event Trigger (Most Common for Conversions)

This is the recommended approach: push a data layer event, then trigger on it.

SettingValue
Trigger TypeCustom Event
Event Namepurchase (must match event key in dataLayer.push)
This trigger fires onAll Custom Events (or add conditions)

Click Trigger with CSS Selector

For tracking button clicks without a data layer event:

SettingValue
Trigger TypeClick - All Elements
This trigger fires onSome Clicks
ConditionClick Element matches CSS selector button.cta-submit

Common CSS selectors:

SelectorMatches
#submit-btnElement with id="submit-btn"
.cta-buttonElements with class="cta-button"
button[type="submit"]Submit buttons
a[href*="tel:"]Phone links
a[href*="mailto:"]Email links
form.contact-formSpecific form element

URL Matching Conditions

Match TypeValueMatches
equals/thank-youExact path only
containsthank-youAny URL containing the string
starts with/checkout/URLs beginning with /checkout/
matches RegEx`/(thank-youconfirmation)`
does not containpreview=trueExcludes preview mode

Form Submission Trigger

SettingValue
Trigger TypeForm Submission
Wait for TagsCheck (waits for tags before form navigates)
Check ValidationCheck (only fires if form validates)
Enable this trigger whenAll Forms (or add conditions)
This trigger fires onSome Forms
ConditionForm ID equals contact-form

Warning: Form Submission triggers can be unreliable with SPAs (Single Page Applications) or AJAX forms. In those cases, use a Custom Event trigger with a data layer push from your form handler code.

Part 7: Variables

Variables supply dynamic values to your tags. Set these up before creating tags.

Data Layer Variables (Most Important)

Variable NameData Layer Variable NameExample Value
DLV - ecommerce.valueecommerce.value149.99
DLV - ecommerce.currencyecommerce.currencyEUR
DLV - ecommerce.transaction_idecommerce.transaction_idT-20260403-001
DLV - ecommerce.itemsecommerce.items[{item_id: ...}]
DLV - valuevalue50
DLV - currencycurrencyEUR
DLV - lead_typelead_typecontact_form
DLV - user_data.emailuser_data.email[email protected]

URL Variables

Variable NameComponent TypeExample Use
URL - PathPath/products/shoes
URL - QueryQuery (key: utm_source)google
URL - FullFull URLhttps://example.com/page?q=1
URL - HostnameHostnameexample.com

1st Party Cookie Variables

Variable NameCookie NameUse Case
Cookie - _ga_gaGA client ID extraction
Cookie - user_logged_inuser_logged_inConditional tag firing

Lookup Table Variable (Page Type)

Map URL paths to page types for remarketing:

Input (Page Path)Output
/home
contains /product/product
contains /category/category
/cartcart
/checkout/confirmationpurchase
Defaultother

Custom JavaScript Variable (Item Count)

function() {
  var ecommerce = {{DLV - ecommerce.items}};
  if (ecommerce && Array.isArray(ecommerce)) {
    return ecommerce.reduce(function(sum, item) {
      return sum + (item.quantity || 1);
    }, 0);
  }
  return 0;
}

Part 8: Tag Sequencing and Firing Order

Tags can depend on other tags. Use sequencing to control execution order.

Recommended Firing Order

OrderTagWhy
1Consent InitializationMust fire before any tracking
2Google Tag (GA4 Config)Initializes GA4
3Conversion LinkerRequired for Google Ads attribution
4Meta Pixel BaseInitializes Meta tracking
5LinkedIn Insight Tag BaseInitializes LinkedIn tracking
6TikTok Pixel BaseInitializes TikTok tracking
7+Event-specific tagsFire on their respective triggers

Tag Sequencing Configuration

In any event tag (e.g., Meta Purchase):

  1. Open tag settings > Advanced Settings > Tag Sequencing
  2. Check "Fire a tag before [this tag] fires"
  3. Select the base/init tag (e.g., Meta Pixel Base Code)
  4. Check "Don't fire [this tag] if [setup tag] fails"

Tag Firing Priority

Use numeric priority values (higher = fires first):

TagPriority
Consent initialization200
Google Tag (GA4 Config)150
Conversion Linker140
Platform base codes100
Conversion event tags0 (default)

Part 9: Testing and Debugging

GTM Preview Mode Checklist

  1. Click "Preview" in GTM workspace
  2. Enter your website URL
  3. Navigate to the page/action you want to test
  4. In the debug panel, verify:
    • Tags fire on the correct triggers
    • Tags fire in the correct order
    • Data Layer variables resolve to expected values
    • No tags fire that should not fire
    • No JavaScript errors in the console

Platform-Specific Debugging Tools

PlatformToolHow to Access
GA4DebugViewGA4 > Admin > DebugView (enable debug_mode parameter)
GA4Real-TimeGA4 > Reports > Real-time
Google AdsTag Assistanttagassistant.google.com
MetaPixel HelperChrome extension "Meta Pixel Helper"
MetaEvents Managerbusiness.facebook.com > Events Manager > Test Events
LinkedInInsight Tag HelperChrome extension "LinkedIn Insight Tag Helper"
TikTokPixel HelperChrome extension "TikTok Pixel Helper"

Common Debugging Issues

SymptomLikely CauseFix
Tag never firesTrigger condition wrongCheck URL/event matching in Preview
Tag fires twiceDuplicate trigger or tagCheck for multiple tags with same purpose
Value shows as undefinedData Layer variable path wrongCheck exact path in Data Layer tab
Conversion count differs from GA4Deduplication missingAdd transaction_id to both
Meta Pixel shows "inactive"Base code not loadingCheck tag sequencing, consent blocking
Google Ads shows 0 conversionsConversion Linker missingAdd Conversion Linker on All Pages

Part 10: Using MCP Tools for GTM Management

Available MCP Tools

  • gtm_list_containers -- List all GTM containers and accounts. Use to find container IDs before auditing.

  • gtm_audit -- Audit a container to see all tags, triggers, and variables. Use to verify your implementation matches your tracking plan, find duplicate tags, or identify missing conversion tags.

  • gtm_manage -- Create, update, or delete tags, triggers, and variables programmatically. Use to batch-create tags from your tracking plan or update configurations across multiple tags.

Audit After Implementation

After setting up all tags, run an audit to verify:

gtm_audit(container_path="accounts/123456/containers/789012")

Check for:
- All P0 conversion tags present
- Each tag has correct trigger
- No duplicate tags for same event
- Base/init tags have higher priority
- Tag sequencing configured for dependent tags
- Variables resolve correctly

Batch Tag Creation Pattern

Use gtm_manage to create tags programmatically when setting up multiple platforms:

1. Create all Data Layer Variables first
2. Create triggers for each event
3. Create platform base tags (GA4 Config, Pixel base codes)
4. Create event-specific tags with correct triggers
5. Run gtm_audit to verify
6. Test in Preview mode
7. Publish workspace

Other skills for the same job

Different authors, same problem. Matched on the words in the skill name, across every library in the catalogue except this one.

Need help setting it up?

This page tells you what gtm-conversion-setup-guide does and what it needs. Cheetah builds the agent setup it runs inside: data, CRM, sequencing and the guardrails.

Book a call →

The directory stays free. There is nothing gated behind this.