AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

conversion-tracking

Set up, audit, verify, or fix website conversion tracking. Use when the conversion is a form submission, booked meeting, chat, phone call, signup, or purchase; when conversions must reach Google Ads, Meta, GA4, LinkedIn, TikTok, or Microsoft Ads; when the work involves GTM tags and dataLayer events, pixels, the Conversions API (CAPI), Enhanced Conversions, server-side tagging, or gclid and fbclid capture; or when the user reports conversion problems like "conversions stopped", "double counting", "spend but no conversions", "GA4 and Google Ads don't match", or an Unverified or Inactive status. Covers lead gen and ecommerce. Always fire on confirmed success, never the submit click; verify a test conversion arrives; diagnose before changing anything; offer free and native paths alongside paid ones and disclose partner tools. For tracking plans and UTMs, see analytics. For attribution models, see attribution. For campaigns and bidding, see ads. For CRM lead-stage design, see revops.

Original source
coreyhaines31
License
MIT
Pinned revision
88c79f6528a9347420e57ceb1fff9a60de651768

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read coreyhaines31--conversion-tracking at revision 88c79f6528a9347420e57ceb1fff9a60de651768, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 12

references/google-ads.md

Google Ads

Part A: setup from zero

Guided setup for wiring a form or booking tool to Google Ads. The agent usually cannot log into the user's ad account, so account steps say exactly where to click and what to report back. Website and GTM steps the agent may be able to do directly.

Contents

  • Before you start (pick Path A or Path B)
  • Path A, with Google Tag Manager (Steps 1 to 5, recommended)
  • Path B, no Google Tag Manager (Steps 6 to 8)
  • Step 9, auto-tagging check (both paths)
  • Enhanced conversions note, then Verification and Common failures

Before you start

You need three things:

  • Access to the Google Ads account (the user has this, you guide them).
  • The form or booking tool in play. This skill has detection recipes for 22 form and booking tools, plus 4 universal patterns (phone clicks, file downloads, thank-you pages, and generic AJAX forms). The full list with canonical dataLayer event names lives in ../assets/gtm-recipes/event-map.json and ../assets/snippets/README.md. Example, Gravity Forms pushes gravity_form_submitted. Supported tools are Acuity Scheduling, Cal.com, Calendly, Contact Form 7, Divi Forms, Elementor Forms, Fluent Forms, Formidable Forms, Forminator, Framer Forms, Gravity Forms, HubSpot Forms, Jotform, Ninja Forms, Squarespace Forms, Tally, Typeform, Webflow Forms, Wix Forms, Wix Bookings, WPForms, and WS Form.
  • A decision on the install path. Check the site's page source for a GTM- container snippet, or ask the user. If GTM is installed, use Path A. If not, use Path B. Never do both, that double counts.

Also do a quick duplicate pre-check before installing anything. Fetch the page source and look for an existing AW- ID, a gtag('event', 'conversion' call, or an existing Google Ads conversion tag inside the GTM container. If the same real-world action is already being tracked, fix or replace that setup rather than adding a second one on top. Two tags for one form is the classic overcounting setup.

How the pieces fit, so you can explain it to the user:

  1. The detection code watches the form and pushes a dataLayer event the moment someone actually submits.
  2. The Google Ads conversion tag hears that event and reports a conversion using the Conversion ID and Label.
  3. The Conversion Linker (Path A) or the Google tag (Path B) stores the gclid, the click ID Google appends to ad URLs when auto-tagging is on.
  4. Google matches the conversion to the stored click ID, and the conversion shows up against the campaign that earned it.

Values to collect from the user along the way, so nothing stalls mid-flow:

  • The Conversion ID and Conversion label (Step 2).
  • Whether auto-tagging is on (Step 9).
  • The conversion action's Status column reading, any time verification is in question.

Path A, with Google Tag Manager (recommended)

End state, GTM does all the listening and firing, and nothing gets pasted into the site's code. The user does Steps 1 and 2 in their Google Ads account and reports 2 values back. The agent can usually do Steps 3 to 5 itself if it has GTM access, otherwise guide the user through them.

Step 1 - Create the conversion action in Google Ads

  • Goal. Create a Website conversion action so Google Ads has something to record submissions against.
  • Do this. Ask the user to sign in to Google Ads, click the Goals icon in the left menu, then Conversions, then Summary, then click + Create conversion action (older accounts show + New conversion action). Choose Website. If Google asks for the website address and scans the site, skip the "Automatically without code" suggestions and choose to add a conversion action manually. Set the category to Submit lead form (use Book appointment for Acuity Scheduling, Cal.com, Calendly or Wix Bookings), give it a clear name like "Lead form submitted", leave value off or use one value per conversion, set counting to One, then save.
  • Expect to see. The new action appears under Goals, Conversions, Summary with status "Unverified". That status is normal at this point.
  • On error. If the user only sees a simplified screen with no Goals menu, the account is in Smart Mode and needs switching to expert mode first. If the only option offered tracks page visits by URL, they went down the "Automatically without code" route, which counts page loads rather than real submissions. Go back and add the action manually.

Step 2 - Grab the Conversion ID and Conversion Label

  • Goal. Get the 2 values the tag needs, the Conversion ID (the digits after AW-) and the Conversion Label.
  • Do this. Ask the user to click the new conversion action's name in the Summary table, scroll to the "Tag setup" section, and click "Use Google Tag Manager". Have them read back the Conversion ID and Conversion label shown there. The "Install the tag yourself" option shows the same 2 values inside the code, after AW- and after the slash in send_to.
  • Expect to see. A Conversion ID that is all digits (like 123456789) and a Conversion label that is a short mixed-case string (like AbCdEfGhIj).
  • On error. No "Tag setup" section usually means the action was created as a URL-based or imported action, which has no label. Recreate it manually per Step 1. If the ID they read starts with AW-, just strip that prefix, the script also strips it for you.

Step 3 - Build the import file

  • Goal. Produce 1 GTM container file that bundles the tool's detection tag, the Google Ads conversion tag, and a Conversion Linker tag.
  • Do this. Run this, substituting the tool key from ../assets/gtm-recipes/event-map.json and the 2 values from Step 2. python3 ../scripts/build_recipe.py --tool {tool} --send google-ads --conversion-id {id} --conversion-label {label} -o import-me.json The script uses only the Python standard library and can run from any folder, paths resolve relative to the script file.
  • Expect to see. The script prints "wrote import-me.json" plus which dataLayer event it detects and where it sends.
  • On error. "invalid choice" on --tool means the tool key is misspelled or unsupported, check the 26 keys in ../assets/gtm-recipes/event-map.json. A complaint about missing --conversion-id or --conversion-label means Step 2 values were not passed.
  • Acuity only. Acuity needs a second file. Paste ../assets/snippets/acuity-scheduling-field.html into Acuity's Custom Conversion Tracking field (Integrations, then Custom Conversion Tracking) with the site's own address in SITES, or no booking ever reaches the page. Acuity runs that field for package and gift certificate purchases too, so count only events where acuity_type is appointment.

Step 4 - Import the file into GTM

  • Goal. Load the 3 tags and their trigger into the site's existing GTM container without touching anything already there.
  • Do this. In Google Tag Manager open the site's container, click Admin, then Import Container. Choose the import-me.json file, pick the Existing workspace (usually Default Workspace), choose Merge, then Rename conflicting tags, triggers, and variables. Review the preview dialog and click Confirm.
  • Expect to see. The preview dialog lists roughly 3 added tags and 1 added trigger, no deletions. After confirming, the workspace shows the new tags.
  • On error. If the container already had a Conversion Linker tag, the import creates a renamed duplicate. Keep 1 and delete the other. If the preview shows deletions, stop, Overwrite was selected instead of Merge.

Step 5 - Preview, test, publish

  • Goal. Prove the tags fire on a real submission before making them live.
  • Do this. In GTM click Preview, connect to the page carrying the form, and submit a test entry (ask the user first before submitting on a production site). In the Tag Assistant window, look for the tool's event (for example gravity_form_submitted) in the left timeline and confirm the "Google Ads Conversion" tag fired on it. Then go back to GTM and click Submit, then Publish.
  • Expect to see. The detection event appears exactly once per submission, and the conversion tag shows as Fired.
  • On error. If the detection event never appears, the form may sit inside an iframe from another domain, or the tool guess was wrong. Recheck against the table in ../assets/snippets/README.md. If the event appears twice, the detection snippet is installed twice (pasted in the site head and imported into GTM), remove one.

Path B, no Google Tag Manager

End state, 3 pieces of code sit in the site's <head> via the platform's custom code setting. The detection snippet, the Google tag, and a small listener that fires the conversion. No GTM account needed.

Step 6 - Create the conversion action and grab the IDs

  • Goal. Same as Path A, get a conversion action plus its Conversion ID and Conversion Label.
  • Do this. Follow Steps 1 and 2 above exactly. On the Tag setup screen, "Install the tag yourself" is the natural choice here, and both values are visible inside the code it shows.
  • Expect to see. A conversion action with status "Unverified", plus the ID and label written down.
  • On error. Same failure modes as Steps 1 and 2.

Step 7 - Install the detection snippet

  • Goal. Make the site announce each submission as a dataLayer event.
  • Do this. Copy the matching ../assets/snippets/{tool}.js file from this repo and paste it inside a <script> tag in the site's <head>, using the platform's custom code setting (for example WordPress header scripts, Webflow custom code, Framer custom code).
  • Expect to see. After a test submission, running window.dataLayer.filter(e => e.event) in the browser console shows the tool's event (for example typeform_form_submitted) exactly once.
  • On error. Nothing in the dataLayer means the snippet is not on the page carrying the form, or the wrong tool's snippet was used. The event firing twice means it was installed twice.
  • Acuity only. Acuity needs a second file. Paste ../assets/snippets/acuity-scheduling-field.html into Acuity's Custom Conversion Tracking field (Integrations, then Custom Conversion Tracking) with the site's own address in SITES, or no booking ever reaches the page. Acuity runs that field for package and gift certificate purchases too, so count only events where acuity_type is appointment.

Step 8 - Add the Google tag and the conversion listener

  • Goal. Load Google's tag and fire a conversion whenever the detection event appears.
  • Do this. Paste this into the site's <head>, after the detection snippet is also in place. Replace AW-XXXXXXXXX with AW- plus the Conversion ID, YYYYYYYYYYY with the Conversion Label, and TOOL_EVENT_NAME with the canonical event from ../assets/gtm-recipes/event-map.json.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-XXXXXXXXX');
</script>

<!-- Conversion listener. Fires when the detection event is pushed -->
<script>
  (function () {
    window.dataLayer = window.dataLayer || [];
    var originalPush = window.dataLayer.push;
    window.dataLayer.push = function (obj) {
      var result = originalPush.apply(this, arguments);
      if (obj && obj.event === 'TOOL_EVENT_NAME') {
        gtag('event', 'conversion', {
          'send_to': 'AW-XXXXXXXXX/YYYYYYYYYYY'
        });
      }
      return result;
    };
  })();
</script>
  • Expect to see. On a test submission, the browser's Network tab shows a request to googleadservices.com or google.com containing /pagead/conversion/ with the ID and label.
  • On error. No conversion request usually means a placeholder was left unreplaced (search the page source for XXXXXXXXX) or the event name does not match the canonical name exactly. A 400 style response often means the label is wrong.

Auto-tagging check (both paths)

Step 9 - Confirm auto-tagging is on

  • Goal. Make sure every ad click carries a gclid, the click ID Google uses to match a conversion back to the ad. Without it, tagged conversions cannot be credited.
  • Do this. Ask the user to click the Admin icon in Google Ads, then Account settings, then the Auto-tagging section, and confirm the box "Tag the URL that people click through from my ad" is checked. If not, check it and click Save.
  • Expect to see. The box checked. Clicking one of their own ads lands on a URL containing ?gclid=.
  • On error. If the box is on but landing URLs have no gclid, the site is stripping URL parameters through a redirect. See the click ID chain checks in Part B below and in audit-playbook.md.

Enhanced conversions

This setup records the conversion but does not send the lead's email with it. The free next step is browser-side: enable enhanced conversions on the conversion action and supply user-provided data in GTM (automatic detection, a CSS selector, or a dataLayer variable) or the Google tag. It rides the same blocker and cookie losses as the tag. Server-side paths (an uploader, a managed tool, or your own backend send) are the alternative where blockers or iframes keep the browser from seeing the email. See server-side.md if match quality matters to the account.

Verification

Observable checks only, in order:

  1. Tag Assistant. Open tagassistant.google.com, connect to the site, submit a test, and confirm the Google Ads conversion tag fires on the detection event.
  2. Status column. In Goals, Conversions, Summary, the action shows "Unverified" at first. That is normal for up to 48 hours, occasionally 72. It should then move to "Recording conversions". "No recent conversions" after that still means the tag is healthy, just quiet.
  3. Troubleshoot link. Hovering a stuck "Unverified" or "Tag inactive" status shows a Troubleshoot link that launches Tag Assistant against the site. Use it before assuming the worst.
  4. Real ad click test. Website conversions only count after an ad click. A bare test submission proves the tag fires but will not appear as a conversion. Click a live ad, submit, then check the next day.
  5. The 3 day rule. Never judge a reporting window that ends less than 3 days ago. Conversions post against the click date and keep arriving late, so recent totals always grow retroactively.
  6. Duplicate scan. In the Summary table, confirm only 1 Primary conversion action exists for this real-world action. If a GA4 key event import for the same form also sits at Primary, demote one to Secondary or bidding counts every lead twice (details in Part B below).
  7. Set expectations. Even a perfect browser-side setup misses typically 10–30% (depending on audience) of conversions to ad blockers, Safari cookie limits, and cross-device journeys (clicked on a phone, converted on a laptop). That gap is environmental, not a bug. See discrepancies.md.

Common failures

For anything that goes wrong after setup (statuses stuck on Unverified, Tag inactive dates, double counting, consent mode killing conversions, gclid stripping), work through the failure catalog in Part B below.

Part B: diagnostic reference

Compiled August 2026 from Google Ads Help documentation, practitioner blogs (Analytics Mania, Adalysis, Adnan Agic, PPC Land, Cometly, TagFly, Elevar, ConversionTracking.io), and community threads.

Fix assets. From-zero setup steps are in Part A above. Missing or wrong triggers are usually fixed by this skill's tested assets: ../assets/snippets/, ../assets/gtm-recipes/, merged and ID-injected by ../scripts/build_recipe.py.

Part B.1: Diagnostic Surfaces (check these first, in this order)

1.1 Conversion action status - Goals > Conversions > Summary

The "Status" column per conversion action is the single highest-value diagnostic signal:

| Status | Meaning | Implication | |---|---|---| | Unverified | Google has never seen the tag fire for this action. Normal for a few hours (up to 48h) after setup; if it persists for days, the tag was never installed, has the wrong ID/label, or fires on a page nobody visits | Broken setup - tag never fired once | | Recording conversions | Tag seen and conversions recorded in last 7 days | Healthy | | No recent conversions | Tag IS detected, but zero conversions in last 7 days | Tag works; either no conversions actually happened, low volume, or the event snippet page is unreachable. Not necessarily broken | | Tag inactive / Inactive | Google no longer sees the tag AND no conversions in 7 days. UI shows last-detected date and last-conversion date | Tag was removed/broken on a specific date - correlate with site redesigns, GTM publishes, plugin updates | | Needs attention | Active but has errors (commonly enhanced-conversions data problems) | Partially working; open Diagnostics | | Removed | Conversion action deleted/disabled in the account | Re-enable the action |

Three more statuses the table above misses. Harvested from Google's own status documentation, and each means something different from the four above:

  • Misconfigured. Conversions have stopped recording entirely because of a setup error or a broken tag. This is the most urgent status there is and it is not the same as Unverified: Unverified means never seen, Misconfigured means it worked and now does not.
  • Awaiting conversions. No conversions in 7 days, expected when the action was created under 48 hours ago, the campaigns are paused, or traffic is too low to produce one. Do not diagnose a tag problem from this without first checking whether campaigns are even running.
  • Removed (deleted or archived). Distinct from the disabled "Removed" row above: the action was manually deleted or archived. Nothing is broken; someone did this on purpose, possibly a previous agency. Ask before recreating it.

Separately, Tag Diagnostics grades tags excellent / good / needs attention / urgent, and there are three distinct enhanced-conversions diagnostic reports (web tag, web API, and leads). A user saying "diagnostics says there's a problem" could mean any of them, so ask which screen they are looking at before interpreting it.

The last detected date on Tag inactive dates the breakage - ask "what changed on the site/GTM/plugins on that date?"

1.2 Built-in Troubleshoot flow / Tag Assistant

Hovering an "Unverified"/"Tag inactive"/"Needs attention" status shows a Troubleshoot link that launches Google Tag Assistant (tagassistant.google.com).

1.3 Diagnostics tab (enhanced conversions)

Goals > Summary > Diagnostics: grades Excellent / Good / Needs attention / No recent data / Urgent, plus alerts (missing user_data fields, formatting errors, low match rate).

1.4 Auto-tagging setting

Admin > Account settings > Auto-tagging - must be ON for gclid attribution and any offline/CRM import.

1.5 Other account-level surfaces

  • "Maintain your Google tag" - surfaces "Website redirects are losing click data" warning
  • Conversion action settings: count (One/Every), click-through window (default 30d), attribution model, Primary/Secondary
  • Segment > Conversions > Conversion action on campaign tables - reveals WHICH action generated the numbers (catches double counting)
  • "by conv. time" columns - conversions are otherwise reported against click date, not conversion date

Part B.2: Tag anatomy

2.1 Google tag (gtag.js)

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-XXXXXXXXXX');
</script>

IDs: AW- Google Ads, G- GA4, GTM- container, DC- Floodlight. A page with only G-/GTM- can still work if Ads conversions run through GTM - check container contents before declaring missing.

2.2 Event snippet

gtag('event', 'conversion', {'send_to': 'AW-XXXXXXXXXX/AbCdEfGhIj0123456789', 'value': 0.0, 'currency': 'USD'});

send_to = AW-CONVERSION_ID/CONVERSION_LABEL. Google offers "page load" (thank-you page) or "click" (gtag_report_conversion(url)) variants.

2.3 GTM pattern

GTM-XXXXXXX snippet in head + noscript iframe. Inside: a Google Ads Conversion Tracking tag (ID + Label) plus a Conversion Linker tag on All Pages.

2.4 Network requests that prove a conversion fired

  • Classic ping: googleadservices.com/pagead/conversion/{ID}/?...label={LABEL}
  • Consent-aware paths: google.com/pagead/1p-conversion/... and .../ccm/collect
  • gcs param encodes consent (G111 granted, G100 denied); gcd = Consent Mode v2 state. gcs=G100 on the ping = conversion modeled at best, not recorded.

2.5 gclid lifecycle

  1. Auto-tagging appends ?gclid= at click time (iOS/privacy contexts use gbraid/wbraid)
  2. gclid must survive every redirect to the tagged page
  3. Google tag / Conversion Linker stores it in first-party cookies: _gcl_aw (gclid), _gcl_gb (wbraid/gbraid), _gcl_dc (dclid). Linker must fire on ALL pages, before conversion tags.
  4. Event snippet reads the cookie and sends it with the ping
  5. Google keeps gclid 90 days; offline imports referencing older clicks fail. Conversion must land inside the action's click window (default 30d).

Chain test: visit landingpage?gclid=TEST123 → confirm survives redirects → check cookies for _gcl_aw containing TEST123 → submit form → look for conversion ping in Network.

Part B.3: Failure catalog

Category A - Tag missing or never firing

  • A1. Tag never installed / wrong pages (VERY COMMON): status stuck Unverified; spend with zero conversions ever. Check landing AND thank-you page source for AW-/GTM-.
  • A2. Tag removed during redesign/migration/theme or plugin update (VERY COMMON): was Recording, now Tag inactive; conversions flatline on a date. Correlate last-detected date with deploys.
  • A3. GTM changes never published (VERY COMMON): tags exist only in an unpublished workspace draft. Check GTM Versions.
  • A4. Wrong Conversion ID or Label (COMMON): GTM Preview shows tag firing, Ads records nothing. Compare GTM values against the action's Tag setup character-for-character.
  • A5. Tag from the wrong account / MCC confusion (OCCASIONAL, agency-specific): conversions land in a previous agency's account, or MCC cross-account tracking conflicts. Compare on-page AW- ID with the account's conversion tracking ID.
  • A6. Performance/caching layers blocking the tag (OCCASIONAL): Cloudflare Rocket Loader/APO, WP Rocket JS-delay, CSP blocks. Console errors; no request to googletagmanager.com.

Category B - Tag fires but the conversion moment is missed (heart of lead-gen audits)

  • B1. GTM Form Submission trigger doesn't fire (VERY COMMON): AJAX forms without standard submit events, misconfigured validation/conditions, broken dataLayer. Fix: thank-you pageview, Element Visibility on success message, platform callback, or dataLayer push.
  • B2. Form in a cross-origin iframe (VERY COMMON): Typeform, Calendly, HubSpot, Jotform. Parent GTM can't see submissions; iframe can't see parent's _gcl_aw. Fix: postMessage listeners, provider redirect to first-party thank-you, or capture gclid to hidden field + server-side import.
  • B3. Conversion fires on a page that redirects before ping completes (COMMON): browser kills the request in flight. Fix: thank-you page firing or gtag_report_conversion callback.
  • B4. Thank-you page URL changed / trigger mismatch (VERY COMMON): trigger matches /thank-you, page became /thanks; trailing-slash or query-string breaking "equals" conditions.
  • B5. No thank-you page at all, inline success message (COMMON): Element Visibility trigger or provider callback needed.
  • **B6. Overcounting: wrong page / per-pageview