<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MD Niamul</title>
    <description>The latest articles on DEV Community by MD Niamul (@mdniamul0).</description>
    <link>https://dev.to/mdniamul0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4194302%2Faa5b5df8-4702-4a6b-b428-8a893551751a.png</url>
      <title>DEV Community: MD Niamul</title>
      <link>https://dev.to/mdniamul0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mdniamul0"/>
    <language>en</language>
    <item>
      <title>Track Stripe and PayPal Purchases in Google Ads with a GTM Custom HTML Tag</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:00:55 +0000</pubDate>
      <link>https://dev.to/mdniamul0/track-stripe-and-paypal-purchases-in-google-ads-with-a-gtm-custom-html-tag-3c9d</link>
      <guid>https://dev.to/mdniamul0/track-stripe-and-paypal-purchases-in-google-ads-with-a-gtm-custom-html-tag-3c9d</guid>
      <description>&lt;p&gt;Stripe shows sales every day. Google Ads shows almost none. GA4 says the money came from stripe.com. I hear this from clients nearly every week, and the ads are usually fine. The tracking stops at the payment page.&lt;/p&gt;

&lt;p&gt;Stripe Google Ads conversion tracking works when Stripe or PayPal sends the buyer back to a thank-you page on your own site with the order ID in the URL. A Google Tag Manager tag reads that ID once, pushes one purchase event, and fires Google Ads, GA4 and Meta with the value and a transaction ID.&lt;/p&gt;

&lt;p&gt;Think of a shop where the till sits in a different building. Your site never sees the payment, so unless the buyer walks back with a receipt, nobody on your side knows a sale happened. I set this up as a &lt;a href="https://mdniamul.com/third-party-checkout-conversion-tracking-services/" rel="noopener noreferrer"&gt;done-for-you Stripe and PayPal tracking setup&lt;/a&gt;. Below is the five-step version of the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Find where your Stripe and PayPal buyers land after paying
&lt;/h2&gt;

&lt;p&gt;Your GTM container runs on your own pages. It does not run on checkout.stripe.com or paypal.com, so no tag can fire there. The only moment you can catch the sale is when the buyer comes back, and that depends on how each checkout is set up.&lt;/p&gt;

&lt;p&gt;Stripe Payment Links and Stripe Checkout can send the buyer back with a session ID. PayPal Payments Standard sends a tx value if Auto Return is on. PayPal JavaScript buttons send whatever your own code adds. Before you change anything, run your site through my &lt;a href="https://mdniamul.com/free-tracking-audit-tool/" rel="noopener noreferrer"&gt;tracking audit tool&lt;/a&gt; to see what already fires.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List every place you take payment: Payment Links, Stripe Checkout, PayPal buttons.&lt;/li&gt;
&lt;li&gt;Pay a small test order on each one and watch where the browser ends up.&lt;/li&gt;
&lt;li&gt;Write down what is in the URL on arrival: session_id, tx, or nothing.&lt;/li&gt;
&lt;li&gt;Make sure GTM is installed on every page of your site, including the thank-you page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw1as1wb0od4uy4s0f8gv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw1as1wb0od4uy4s0f8gv.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Send every buyer back to a thank-you page with the order ID
&lt;/h2&gt;

&lt;p&gt;In Stripe, open your Payment Link, go to After the payment and redirect to your own website. Use a URL like /thank-you/?session_id={CHECKOUT_SESSION_ID}&amp;amp;product=pro-plan&amp;amp;value=49&amp;amp;currency=USD. Stripe swaps the template for the real session ID. For clean campaign links on the same Payment Link, use my &lt;a href="https://mdniamul.com/free-utm-builder/" rel="noopener noreferrer"&gt;UTM builder&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In PayPal, turn on Auto Return and Payment Data Transfer in Website preferences, so PayPal adds tx to your Return URL. Then open GA4, go to your web stream's tag settings and add checkout.stripe.com, stripe.com and paypal.com to List unwanted referrals. Without that, GA4 credits your revenue to stripe.com. My &lt;a href="https://mdniamul.com/blog/stripe-third-party-checkout-tracking-ga4-with-gtm/" rel="noopener noreferrer"&gt;my Stripe and GA4 guide&lt;/a&gt; covers the GA4 side in more detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set the Stripe redirect to your thank-you page and paste {CHECKOUT_SESSION_ID} exactly as written, with curly braces.&lt;/li&gt;
&lt;li&gt;Add a fixed value and currency to each Payment Link redirect.&lt;/li&gt;
&lt;li&gt;In PayPal, turn on Auto Return and Payment Data Transfer, then set the Return URL.&lt;/li&gt;
&lt;li&gt;Add checkout.stripe.com, stripe.com and paypal.com to GA4 unwanted referrals.&lt;/li&gt;
&lt;li&gt;Check that the Conversion Linker tag fires on all pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faymazo9ol1md5moe2adt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faymazo9ol1md5moe2adt.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Add one purchase tracker tag in Google Tag Manager
&lt;/h2&gt;

&lt;p&gt;This tag does the real work. It is a Custom HTML tag that runs only on your thank-you page. It reads the Stripe session ID, the PayPal tx or your own order ID from the URL, works out the value and currency, and pushes one GA4-style purchase event into the data layer.&lt;/p&gt;

&lt;p&gt;It also remembers each order ID in the browser, so a reload or a bookmark does not count the same sale twice, and it skips PayPal payments that are still pending. The full code is in my blog post. Read it once before you paste it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In GTM, go to Tags, New, and choose Custom HTML.&lt;/li&gt;
&lt;li&gt;Paste the tracker code and set CURRENCY to your store currency.&lt;/li&gt;
&lt;li&gt;Fill the PRICES list only if some redirect URLs have a product name but no value.&lt;/li&gt;
&lt;li&gt;Set the trigger to Page View, with Page Path containing /thank-you, for this tag only.&lt;/li&gt;
&lt;li&gt;Name the tag cHTML Stripe PayPal Purchase and save it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyx63qg0qyqk6utkzn1bc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyx63qg0qyqk6utkzn1bc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Fire Google Ads, GA4 and Meta on one purchase event, then test
&lt;/h2&gt;

&lt;p&gt;Create data layer variables for the transaction ID, value, currency and checkout provider, plus a Custom Event trigger for purchase. Then add a Google Ads Conversion Tracking tag with the value, currency and transaction ID filled in. Google does not count a second conversion with the same ID, so that is your safety net against duplicates. Add a GA4 purchase tag and a Meta Purchase tag that uses the same ID as its event ID.&lt;/p&gt;

&lt;p&gt;Now test. Turn on GTM Preview and pay a Stripe test order with the test card 4242 4242 4242 4242. On the thank-you page, open the purchase event and check the Data Layer tab. Reload the page and make sure no second purchase appears. If you have visitors from Europe, test your banner with my &lt;a href="https://mdniamul.com/free-consent-mode-checker/" rel="noopener noreferrer"&gt;Consent Mode checker&lt;/a&gt; as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create four data layer variables: transaction ID, value, currency and checkout provider.&lt;/li&gt;
&lt;li&gt;Create a Custom Event trigger for purchase.&lt;/li&gt;
&lt;li&gt;Add the Google Ads tag with Conversion Value, Transaction ID and Currency Code mapped.&lt;/li&gt;
&lt;li&gt;Add the GA4 purchase tag and the Meta Purchase tag with the same ID as the event ID.&lt;/li&gt;
&lt;li&gt;Test with Stripe test mode and a PayPal sandbox buyer, then reload to check for repeats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpx1mmshdj70yaen2zcoy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpx1mmshdj70yaen2zcoy.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Catch the buyers who never come back and compare the numbers weekly
&lt;/h2&gt;

&lt;p&gt;Some buyers close the tab right after paying. Bank debits and vouchers can take days to confirm. None of them load your thank-you page, so a browser tag cannot see them. I add a server-side backup: server-side GTM on Stape can read the order from the Stripe API with the session ID, or a Stripe webhook can send the sale to Google Ads as an offline conversion. My &lt;a href="https://mdniamul.com/blog/offline-conversion-tracking-crm-google-sheet-gtm/" rel="noopener noreferrer"&gt;my guide to offline conversions&lt;/a&gt; covers that route.&lt;/p&gt;

&lt;p&gt;Then make it a weekly habit. Put Stripe and PayPal payments, GA4 purchases and Google Ads conversions side by side for the same dates. A small gap you can explain is normal. A big one usually means returning buyers, consent or a redirect that drops the URL parameters. If you want a second pair of eyes, see what a &lt;a href="https://mdniamul.com/google-ads-tracking-specialist/" rel="noopener noreferrer"&gt;Google Ads conversion tracking specialist&lt;/a&gt; sets up for clients.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a server-side backup through the Stripe API or webhooks for buyers who do not return.&lt;/li&gt;
&lt;li&gt;Send the same purchase to the Meta Conversions API with the same event ID.&lt;/li&gt;
&lt;li&gt;Compare Stripe, PayPal, GA4 and Google Ads numbers for the same dates every week.&lt;/li&gt;
&lt;li&gt;If Google Ads is far below Stripe, check non-returning buyers first, then consent, then redirects.&lt;/li&gt;
&lt;li&gt;Remove test orders before you scale your ad spend.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qgujz98yx7i6uiwejx7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qgujz98yx7i6uiwejx7.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I track Stripe payments as Google Ads conversions?
&lt;/h3&gt;

&lt;p&gt;Redirect buyers from Stripe to a thank-you page on your site with ?session_id={CHECKOUT_SESSION_ID} in the URL. A GTM tag reads it, pushes a purchase event, and a Google Ads conversion tag fires with the value and the ID as the transaction ID.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does Google Ads not show my Stripe purchases?
&lt;/h3&gt;

&lt;p&gt;Usually the payment happens on checkout.stripe.com, where your tags do not run, and the buyer stays on Stripe's page or returns to a page with no order details. Redirect to your own thank-you page and fire the conversion there.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I track PayPal transactions on my website?
&lt;/h3&gt;

&lt;p&gt;For PayPal Payments Standard, turn on Auto Return and Payment Data Transfer and set your thank-you page as the Return URL. PayPal then adds the transaction ID as tx. For JavaScript buttons, redirect from your onApprove code with the order ID and amount.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does GA4 show stripe.com as the source of my sales?
&lt;/h3&gt;

&lt;p&gt;The buyer comes back from the payment domain, so GA4 starts a referral session. Add checkout.stripe.com, stripe.com and paypal.com to List unwanted referrals. It fixes new sessions only, so test with a fresh purchase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The payment happens off your site, so you catch the sale when the buyer comes back.&lt;/li&gt;
&lt;li&gt;Put {CHECKOUT_SESSION_ID} in the Stripe redirect, and turn on PayPal Auto Return and Payment Data Transfer.&lt;/li&gt;
&lt;li&gt;Send a transaction ID to Google Ads. A repeat with the same ID is not counted twice.&lt;/li&gt;
&lt;li&gt;Add the Stripe and PayPal domains to GA4 unwanted referrals so revenue keeps its Google Ads source.&lt;/li&gt;
&lt;li&gt;Add a server-side backup for buyers who close the tab, and compare the numbers every week.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Stripe Google Ads conversion tracking works when Stripe or PayPal sends the buyer back to a thank-you page on your own site with the order ID in the URL. This guide is for stores and service sellers who take payments through Stripe Payment Links, Stripe Checkout or PayPal. The five steps: find where buyers land, add the redirect and the GA4 referral fix, add one GTM purchase tracker, fire Google Ads, GA4 and Meta then test, and add a server-side backup. The result is real order values in Google Ads.&lt;/p&gt;

&lt;p&gt;Want the full guide with the complete tracker code, the test list and the troubleshooting section? It is here: &lt;a href="https://mdniamul.com/blog/stripe-paypal-google-ads-conversion-tracking-gtm/" rel="noopener noreferrer"&gt;https://mdniamul.com/blog/stripe-paypal-google-ads-conversion-tracking-gtm/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When Stripe shows ten sales this week, how many does Google Ads show?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD Niamul&lt;br&gt;&lt;br&gt;
Conversion Tracking and Web Analytics Specialist, Digital Soldier Agency&lt;/p&gt;

</description>
      <category>googletagmanager</category>
      <category>googleads</category>
      <category>stripe</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Offline Conversion Tracking in GTM Save the GCLID and Import Sales</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Sat, 07 Nov 2026 13:58:06 +0000</pubDate>
      <link>https://dev.to/mdniamul0/offline-conversion-tracking-in-gtm-save-the-gclid-and-import-sales-53mh</link>
      <guid>https://dev.to/mdniamul0/offline-conversion-tracking-in-gtm-save-the-gclid-and-import-sales-53mh</guid>
      <description>&lt;p&gt;Google Ads shows plenty of form fills. Your sales team closed a handful of deals. Nobody can say which ad brought those buyers, so Smart Bidding keeps chasing cheap leads.&lt;/p&gt;

&lt;p&gt;Offline conversion tracking with a CRM or a Google Sheet means saving the Google Click ID (GCLID) with every lead, then sending the leads that become sales back to Google Ads. A Google Tag Manager tag saves the click ID, a hidden form field carries it into your CRM or sheet, and Google Ads Data Manager imports the sale later.&lt;/p&gt;

&lt;p&gt;Think of a coat check. The click ID is the ticket. Lose the ticket at the door and nobody can match the coat later. I set this up for lead gen accounts as an &lt;a href="https://mdniamul.com/offline-conversion-tracking-services/" rel="noopener noreferrer"&gt;done-for-you offline conversion tracking setup&lt;/a&gt;. Below is the five-step version, with the code and the screens from my guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Turn on auto-tagging and check the click ID in your URL
&lt;/h2&gt;

&lt;p&gt;The whole setup depends on one value in the URL. In Google Ads, open Admin, then Account settings, and make sure Auto-tagging is on. Then click one of your own ads, or use the ad preview tool, and look at the landing page address. You should see ?gclid= in it.&lt;/p&gt;

&lt;p&gt;Some iPhone and Safari visits arrive with gbraid or wbraid instead, so save those too. Also check that no redirect strips the parameters. My free &lt;a href="https://mdniamul.com/free-utm-redirect-checker/" rel="noopener noreferrer"&gt;UTM redirect checker&lt;/a&gt; shows that in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Turn on Auto-tagging in Google Ads, Account settings.&lt;/li&gt;
&lt;li&gt;Click your own ad and confirm gclid is in the landing page URL.&lt;/li&gt;
&lt;li&gt;Plan to save gbraid and wbraid as well as gclid.&lt;/li&gt;
&lt;li&gt;Check that no redirect or form tool removes the URL parameters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fik6lcrf9bdnoc49ansrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fik6lcrf9bdnoc49ansrf.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Add a click ID capture tag in Google Tag Manager
&lt;/h2&gt;

&lt;p&gt;This is the tag that makes everything else possible. It is a Custom HTML tag on All Pages. It reads gclid, gbraid, wbraid and the UTMs from the URL and keeps them in a first-party cookie for 90 days. A new ad click replaces the old values, so the last click wins.&lt;/p&gt;

&lt;p&gt;It then fills hidden form fields named gclid, utm_source and so on. It also fills forms that load late, like pop-ups, and it never overwrites a field that already has a value. If a visitor has no click ID saved, it falls back to Google's own _gcl_aw cookie. Capture the click ID on every page, not only the landing page. Google says the same in its own guide. The full code is in my blog post, and you should read it once before you paste it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In GTM, go to Tags, then New, and choose Custom HTML.&lt;/li&gt;
&lt;li&gt;Paste the click ID capture code and name the tag
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffdctcz2dt1htt3jslwlk.png" alt=" " width="800" height="450"&gt;need a banner, require ad_storage consent in the tag's Consent Settings.&lt;/li&gt;
&lt;li&gt;Add hidden fields named gclid, gbraid, wbraid and the UTMs to your forms.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhqbbzvknvo8o3rp6jtfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhqbbzvknvo8o3rp6jtfr.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Test the click ID in GTM Preview and in your CRM
&lt;/h2&gt;

&lt;p&gt;Do not trust a tag you have not seen fire. Click Preview and open your site with a test address like ?gclid=TEST123&amp;amp;utm_source=google. In Tag Assistant, find the click_ids_ready event and open the Data Layer tab. You should see the click ID, the UTMs, the click time and the landing page.&lt;/p&gt;

&lt;p&gt;Then go to another page, submit your form with a test email, and open the new contact in your CRM. The GCLID field should say TEST123. Delete the test contact afterwards so it never gets sent to Google Ads. If the field stays empty, my &lt;a href="https://mdniamul.com/blog/google-ads-offline-conversion-tracking-google-sheets-hubspot-crm/" rel="noopener noreferrer"&gt;HubSpot offline conversion tracking guide&lt;/a&gt; shows how I map the hidden fields to CRM properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click Preview and open your site with ?gclid=TEST123&amp;amp;utm_source=google.&lt;/li&gt;
&lt;li&gt;Find click_ids_ready in Tag Assistant and check the Data Layer values.&lt;/li&gt;
&lt;li&gt;Go to a second page without parameters, then submit the form with a test email.&lt;/li&gt;
&lt;li&gt;Open the contact in your CRM and confirm the GCLID field says TEST123.&lt;/li&gt;
&lt;li&gt;Delete the test contact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flmqgs5ji28xhykpn308o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flmqgs5ji28xhykpn308o.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Store the click ID on the deal and build the offline conversions sheet
&lt;/h2&gt;

&lt;p&gt;Keep the GCLID on the deal or opportunity, not only on the contact. The sale value lives on the deal, and that is what you send back. Each CRM does it a little differently, and I covered &lt;a href="https://mdniamul.com/blog/gohighlevel-offline-conversion-tracking-google-ads-meta/" rel="noopener noreferrer"&gt;my GoHighLevel offline conversions guide&lt;/a&gt; with tested automation code.&lt;/p&gt;

&lt;p&gt;Now make the sheet. One row per conversion, with these columns: Google Click ID, GBRAID, WBRAID, Conversion Name, Conversion Time, Conversion Value, Conversion Currency and Email. Write the time with a time zone, like 2026-11-06 14:30:00 America/New_York, so Google reads it right. Use one conversion name per stage, such as Qualified Lead and Closed Won. My &lt;a href="https://mdniamul.com/free-offline-conversion-builder/" rel="noopener noreferrer"&gt;offline conversion builder&lt;/a&gt; can help with the layout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a custom GCLID field on the deal or opportunity in your CRM.&lt;/li&gt;
&lt;li&gt;Create the sheet with the eight columns above.&lt;/li&gt;
&lt;li&gt;Write every Conversion Time with a time zone.&lt;/li&gt;
&lt;li&gt;Give each stage its own conversion name and its own row.&lt;/li&gt;
&lt;li&gt;Add rows automatically when a deal changes stage, with a CRM workflow, n8n, Make or Zapier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx6vxr7odq3y82wzghpik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx6vxr7odq3y82wzghpik.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Import the sheet into Google Ads and bid on real revenue
&lt;/h2&gt;

&lt;p&gt;In Google Ads, go to Goals, then Summary, then Create conversion action, and choose Conversions offline. Make one action per stage. Wait 4 to 6 hours before the first import. Then connect the sheet through Google Ads Data Manager, map your columns and set it to run daily. Google now calls the old file uploads legacy and points to Data Manager.&lt;/p&gt;

&lt;p&gt;When Closed Won has steady volume, make it a primary goal and test value-based bidding. Add the hashed email to the same rows for enhanced conversions for leads. If you have visitors from the EEA, check your banner with my &lt;a href="https://mdniamul.com/free-consent-mode-checker/" rel="noopener noreferrer"&gt;Consent Mode checker&lt;/a&gt; first. For recovering leads lost to ad blockers, see my &lt;a href="https://mdniamul.com/blog/server-side-offline-conversion-tracking-lead-gen/" rel="noopener noreferrer"&gt;server-side tracking guide for lead gen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create one Conversions offline action per stage in Google Ads.&lt;/li&gt;
&lt;li&gt;Wait 4 to 6 hours, then connect the sheet in Google Ads Data Manager.&lt;/li&gt;
&lt;li&gt;Map your columns to the conversion action and set the import to daily.&lt;/li&gt;
&lt;li&gt;Import within 90 days of the click, because that is the window for a GCLID.&lt;/li&gt;
&lt;li&gt;Test value-based bidding once Closed Won has steady volume.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsexbgmfkdr29042yei85.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsexbgmfkdr29042yei85.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is offline conversion tracking in Google Ads?
&lt;/h3&gt;

&lt;p&gt;It means sending sales that happen after the click, like a closed deal in your CRM, back to Google Ads and matching them to the ad click with the GCLID. Smart Bidding then learns from real revenue.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where do I store the GCLID, in the CRM or a Google Sheet?
&lt;/h3&gt;

&lt;p&gt;Store it with the lead in a custom field, ideally on the deal too. The sheet is just where closed deals are listed for import. You can use a CRM, a sheet or both.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long can I import a GCLID after the click?
&lt;/h3&gt;

&lt;p&gt;Up to 90 days. After that Google cannot match the sale to the click, so import often and at least once a day if you use Smart Bidding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is the GCLID field empty in my CRM?
&lt;/h3&gt;

&lt;p&gt;Usually the form has no hidden field with that name, the form sits in an iframe, or a redirect removed the parameter. Test with ?gclid=TEST123 in GTM Preview to find which.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No click ID, no offline conversion. Google Ads matches a sale to an ad click by the GCLID.&lt;/li&gt;
&lt;li&gt;One GTM Custom HTML tag can save the click IDs for 90 days and fill your hidden form fields.&lt;/li&gt;
&lt;li&gt;Keep the GCLID on the deal, because the sale value lives there.&lt;/li&gt;
&lt;li&gt;Use one row per stage in the sheet, and write every time with a time zone.&lt;/li&gt;
&lt;li&gt;Import through Google Ads Data Manager on a daily schedule, then test value-based bidding.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Offline conversion tracking with a CRM or Google Sheet saves the Google Click ID with every lead and sends closed sales back to Google Ads. A Google Tag Manager Custom HTML tag stores gclid, gbraid, wbraid and UTMs for 90 days and fills hidden form fields. Test it in GTM Preview, store the click ID on the CRM deal, list each stage in a sheet, then import it through Google Ads Data Manager. It is for lead gen teams that want Smart Bidding to learn from sales.&lt;/p&gt;

&lt;p&gt;Want the full guide with the complete code, the sheet columns and the troubleshooting list? It is here: &lt;a href="https://mdniamul.com/offline-conversion-tracking-services/" rel="noopener noreferrer"&gt;https://mdniamul.com/offline-conversion-tracking-services/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can your team tell which ad or keyword brought your last five closed deals?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD Niamul&lt;br&gt;&lt;br&gt;
Conversion Tracking and Web Analytics Specialist, Digital Soldier Agency&lt;/p&gt;

</description>
      <category>googletagmanager</category>
      <category>analytics</category>
      <category>googleads</category>
      <category>javascript</category>
    </item>
    <item>
      <title>GoHighLevel Form Conversion Tracking in GTM: GA4, Google Ads and Meta</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Tue, 03 Nov 2026 12:28:15 +0000</pubDate>
      <link>https://dev.to/mdniamul0/gohighlevel-form-conversion-tracking-in-gtm-ga4-google-ads-and-meta-1l28</link>
      <guid>https://dev.to/mdniamul0/gohighlevel-form-conversion-tracking-in-gtm-ga4-google-ads-and-meta-1l28</guid>
      <description>&lt;p&gt;Your GoHighLevel CRM keeps filling up with new contacts, while GA4 and Google Ads barely move. That gap is a tracking problem, and it usually starts at the form.&lt;/p&gt;

&lt;p&gt;GoHighLevel form conversion tracking with Google Tag Manager works like this: a listener tag catches the message the embedded form sends when someone submits, pushes a ghl_form_submit event into the data layer, and your GA4, Google Ads and Meta tags all fire from that one event.&lt;/p&gt;

&lt;p&gt;Wrong lead numbers mean wrong bids and wasted budget, so this is worth an afternoon. I build it for agencies every week as a &lt;a href="https://mdniamul.com/gohighlevel-conversion-tracking-specialist/" rel="noopener noreferrer"&gt;GoHighLevel tracking specialist&lt;/a&gt;. Below is the five-step version, with real screens from my own Tag Manager container and a real test lead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Check how your GoHighLevel form is added to the page
&lt;/h2&gt;

&lt;p&gt;Most GoHighLevel forms are embedded as an iframe, which is a page inside your page that loads from another domain. Think of a sealed post box in a shop lobby. People drop letters in, but the shop's cameras cannot read what went inside. Google Tag Manager is that camera, so the normal form submission trigger never fires.&lt;/p&gt;

&lt;p&gt;The form does send a short message to the page around it when someone submits. Your page can listen for that message, and Step 2 does exactly that. Before you change anything, scan your container with my &lt;a href="https://mdniamul.com/free-gtm-container-analyzer/" rel="noopener noreferrer"&gt;free tool to scan a GTM container&lt;/a&gt; so you know what is already in it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the page with your form, right-click the form and choose Inspect.&lt;/li&gt;
&lt;li&gt;Look for an iframe with a source on leadconnectorhq.com, msgsndr.com or your white-label domain.&lt;/li&gt;
&lt;li&gt;Write that domain down. You will allow it in the listener.&lt;/li&gt;
&lt;li&gt;Submit one test lead and confirm it lands in GoHighLevel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fty70fyt14ujvgmpcmhtc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fty70fyt14ujvgmpcmhtc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Add the GoHighLevel listener as a Custom HTML tag in GTM
&lt;/h2&gt;

&lt;p&gt;The listener is a Custom HTML tag that waits for the form's message. In my build it trusts only GoHighLevel domains, ignores the load and height messages the form sends all day, and counts each submit once. When a real submit arrives, it pushes ghl_form_submit with the contact details and the visitor's traffic source.&lt;/p&gt;

&lt;p&gt;In the screenshot you can see the tag name and the code. I add two things to every build: a DEBUG_MODE switch that logs each push to the console while you test, and a consent block that you match to your own cookie banner. If you want a starting point, my &lt;a href="https://mdniamul.com/free-form-tracking-listener-generator/" rel="noopener noreferrer"&gt;free tool for building a form listener&lt;/a&gt; writes one for you. Read the code once before you paste it. You should know what runs on your site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In GTM, go to Tags, then New, and choose Custom HTML.&lt;/li&gt;
&lt;li&gt;Paste the listener code and give the tag a clear name.&lt;/li&gt;
&lt;li&gt;Add your white-label domain to the allowed list if you use one.&lt;/li&gt;
&lt;li&gt;Set the trigger to All Pages and save.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqjx6lj0r7kh3uuzxz73c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqjx6lj0r7kh3uuzxz73c.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Send the lead to GA4 as a generate_lead event
&lt;/h2&gt;

&lt;p&gt;Now GTM needs a moment to act on. Create a Custom Event trigger with the event name ghl_form_submit, then a GA4 Event tag called generate_lead that fires on it. I use generate_lead because GA4 and Google Ads already know it, so it shows up in reports and imports cleanly.&lt;/p&gt;

&lt;p&gt;Add one or two useful parameters, like the page path in my screenshot or the form ID, so you can compare forms later. One rule I never bend: do not send email or phone to GA4 as event parameters. Google does not allow personal data in GA4. Once the first lead shows up, mark generate_lead as a key event. The wider GA4 and Google Ads picture is in my &lt;a href="https://mdniamul.com/blog/gohighlevel-conversion-tracking-ga4-google-ads/" rel="noopener noreferrer"&gt;GoHighLevel GA4 and Google Ads tracking guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Custom Event trigger with the event name ghl_form_submit.&lt;/li&gt;
&lt;li&gt;Create a Google Analytics: GA4 Event tag and enter your Measurement ID.&lt;/li&gt;
&lt;li&gt;Set the event name to generate_lead and add page_path or a form ID as a parameter.&lt;/li&gt;
&lt;li&gt;Attach the ghl_form_submit trigger and save.&lt;/li&gt;
&lt;li&gt;In GA4, mark generate_lead as a key event after the first lead arrives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F71hnqza7dizpb10mz6er.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F71hnqza7dizpb10mz6er.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Send the lead to Google Ads with enhanced conversions
&lt;/h2&gt;

&lt;p&gt;GA4 tells you what happened. Google Ads also needs to know which click led to the lead. Add a Google Ads Conversion Tracking tag with your conversion ID and label, and fire it on the same ghl_form_submit trigger. In my tag, called GEC Lead Form Tracking, the event parameters carry the hashed email, phone, first name and last name, plus address fields.&lt;/p&gt;

&lt;p&gt;Those hashed values are what turn it into enhanced conversions for leads. They help Google match the lead to the ad click when cookies fall short. Pass them only when your consent setup allows it. I wrote the full walkthrough in my &lt;a href="https://mdniamul.com/blog/track-gohighlevel-form-leads-google-ads-enhanced-conversions/" rel="noopener noreferrer"&gt;GoHighLevel enhanced conversions guide&lt;/a&gt;. If you also advertise on Meta, add a Meta Pixel Lead tag on the same trigger with an event ID, which is what I did in this build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Google Ads Conversion Tracking tag and enter the conversion ID and label.&lt;/li&gt;
&lt;li&gt;Add the hashed email, phone and name values as event parameters from your variables.&lt;/li&gt;
&lt;li&gt;Fire it on the ghl_form_submit trigger, and keep a Conversion Linker tag on all pages.&lt;/li&gt;
&lt;li&gt;Add a Meta Pixel Lead tag on the same trigger if you run Meta ads.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr553bwztwi9uml4rcuhx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr553bwztwi9uml4rcuhx.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Test with a real lead in Tag Assistant, then publish
&lt;/h2&gt;

&lt;p&gt;Click Preview, open your page and submit a real test lead. In Tag Assistant, find ghl_form_submit in the left list and open it. The API Call should show one push with the form details, the traffic source and an event ID. The contact values are blurred in my screenshot, but they were all there.&lt;/p&gt;

&lt;p&gt;Then open Tags Fired. In my run, the Google Ads tag and the Meta Pixel Lead tag both showed Succeeded. Look at Tags Not Fired too, because your GA4 generate_lead tag should not be sitting there. If it is, check its trigger first. Test your cookie banner with my &lt;a href="https://mdniamul.com/free-consent-mode-checker/" rel="noopener noreferrer"&gt;Consent Mode checker&lt;/a&gt; before you publish. If you would rather have it built and documented for your account, see my &lt;a href="https://mdniamul.com/gohighlevel-form-conversion-tracking-services/" rel="noopener noreferrer"&gt;done-for-you GoHighLevel tracking setup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click Preview in GTM and submit one real test lead on the live page.&lt;/li&gt;
&lt;li&gt;Confirm you see one ghl_form_submit event, not two or three.&lt;/li&gt;
&lt;li&gt;Check Tags Fired: GA4, Google Ads and Meta each fire once.&lt;/li&gt;
&lt;li&gt;Confirm the lead in GA4 DebugView and in Google Ads diagnostics.&lt;/li&gt;
&lt;li&gt;Publish the container with a clear version name.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqswfb2isgxa4zuxvm4e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqswfb2isgxa4zuxvm4e6.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does Google Tag Manager not track my GoHighLevel form?
&lt;/h3&gt;

&lt;p&gt;The form usually loads in an iframe from a GoHighLevel domain. Your page cannot read inside it, so the normal form trigger stays silent. A listener that catches the form's message fixes it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which GA4 event should I use for a GoHighLevel lead?
&lt;/h3&gt;

&lt;p&gt;Use generate_lead. It is a standard GA4 event name and Google Ads understands it. Mark it as a key event so GA4 counts it as a conversion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I send the lead's email to GA4?
&lt;/h3&gt;

&lt;p&gt;No. Google does not allow personal data in GA4 parameters. Use hashed email and phone only for Google Ads enhanced conversions and Meta, and only when consent allows it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does one GoHighLevel submit show up two or three times?
&lt;/h3&gt;

&lt;p&gt;The form can send its submit message more than once. A good listener counts only the message with the contact data, once per form.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GoHighLevel forms usually sit in an iframe, so the normal GTM form trigger cannot see a submit.&lt;/li&gt;
&lt;li&gt;One Custom HTML listener catches the form's message and pushes a single ghl_form_submit event.&lt;/li&gt;
&lt;li&gt;That one event can fire GA4 generate_lead, a Google Ads conversion and a Meta Pixel Lead.&lt;/li&gt;
&lt;li&gt;Hashed email and phone go to Google Ads and Meta only, with consent. Never to GA4.&lt;/li&gt;
&lt;li&gt;Test one real lead in Tag Assistant and check that each tag fires once before you publish.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;GoHighLevel form conversion tracking with Google Tag Manager starts with a Custom HTML listener, because forms embedded as iframes cannot be read by normal triggers. The listener catches the form's submit message and pushes ghl_form_submit into the data layer. A Custom Event trigger then fires a GA4 generate_lead event, a Google Ads conversion tag with enhanced conversions and a Meta Pixel Lead event. Test one real lead in Tag Assistant, check consent, then publish. It is for agencies and lead-gen teams that want CRM leads to match ad reports.&lt;/p&gt;

&lt;p&gt;Want the full guide with the code, calendar tracking and server-side tracking? It is here: &lt;a href="https://mdniamul.com/gohighlevel-form-conversion-tracking-services/" rel="noopener noreferrer"&gt;https://mdniamul.com/gohighlevel-form-conversion-tracking-services/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When did you last compare your GoHighLevel contacts with the conversions in your ads account?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD Niamul&lt;br&gt;&lt;br&gt;
Conversion Tracking and Web Analytics Specialist, Digital Soldier Agency&lt;/p&gt;

</description>
      <category>gohighlevel</category>
      <category>googletagmanager</category>
      <category>ga4</category>
      <category>analytics</category>
    </item>
    <item>
      <title>Track GoHighLevel Lead Forms in GA4 with Google Tag Manager</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Sun, 01 Nov 2026 10:41:55 +0000</pubDate>
      <link>https://dev.to/mdniamul0/track-gohighlevel-lead-forms-in-ga4-with-google-tag-manager-5a96</link>
      <guid>https://dev.to/mdniamul0/track-gohighlevel-lead-forms-in-ga4-with-google-tag-manager-5a96</guid>
      <description>&lt;p&gt;If your GoHighLevel form sits on your website and GA4 shows no leads, the form is not broken. GA4 just cannot see it.&lt;/p&gt;

&lt;p&gt;To track GoHighLevel lead forms in GA4 with Google Tag Manager, add a small listener that catches the message the form sends on submit, push it into the data layer as ghl_form_submit, and fire a GA4 generate_lead event from it. Mark generate_lead as a key event and your leads start showing in reports.&lt;/p&gt;

&lt;p&gt;This matters because every decision you make later, from channel reports to ad bidding, is built on the lead count. A wrong count means wrong decisions. I fix this setup for agencies all the time as a &lt;a href="https://mdniamul.com/gohighlevel-conversion-tracking-specialist/" rel="noopener noreferrer"&gt;GoHighLevel tracking specialist&lt;/a&gt;. Below is the five-step version of the fix, built in a real GTM container.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: See why GA4 misses your GoHighLevel form leads
&lt;/h2&gt;

&lt;p&gt;Most GoHighLevel forms are added to a page as an iframe. Think of an iframe as a glass window in a brick wall. Your page is the wall, and the form is a separate room behind the glass. Google Tag Manager lives on the wall, so it can see the window but not what is typed inside.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browsers block your page from reading a form that loads from another domain. This is the same-origin rule.&lt;/li&gt;
&lt;li&gt;That is why the normal GTM form submission trigger stays silent for these forms.&lt;/li&gt;
&lt;li&gt;A thank-you page can still count a lead, but it carries no form details and breaks when the form shows a message instead of redirecting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The good news is that the form does send a message out through the glass when someone submits. Your page can listen for it. That is the way in, and Step 2 builds it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open your landing page and check how the form is added: an iframe embed or a link to a hosted page.&lt;/li&gt;
&lt;li&gt;Submit one test lead and note it in GoHighLevel.&lt;/li&gt;
&lt;li&gt;Open GA4 Realtime and confirm that nothing arrives. That gap is your starting point.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fglxtygs6xbhve5oeuet4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fglxtygs6xbhve5oeuet4.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Add a listener in Google Tag Manager to catch the form submit
&lt;/h2&gt;

&lt;p&gt;The listener is a short Custom HTML tag. It waits for the message the form sends, and when one arrives it pushes an event called ghl_form_submit into the data layer, together with the form ID and the message type.&lt;/p&gt;

&lt;p&gt;I name the tag clearly, chtml GoHighLevel Iframe Listener, and fire it on Initialization, All Pages, so it is ready before the form loads. The code in my screenshot is a short version to show the idea. GoHighLevel changes its message format from time to time, so log one real message in your browser console and match the field names before you trust it. My &lt;a href="https://mdniamul.com/free-form-tracking-listener-generator/" rel="noopener noreferrer"&gt;free tool for building a form listener&lt;/a&gt; can write a starting version for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In GTM, go to Tags, then New, and choose Custom HTML.&lt;/li&gt;
&lt;li&gt;Paste the listener code and name the tag chtml GoHighLevel Iframe Listener.&lt;/li&gt;
&lt;li&gt;Set the trigger to Initialization, All Pages.&lt;/li&gt;
&lt;li&gt;Save, then keep the container in Preview mode for the next steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr8ikt915n21vtu2vjsrp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr8ikt915n21vtu2vjsrp.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Create the data layer variables and the custom event trigger
&lt;/h2&gt;

&lt;p&gt;Now GTM needs to read what the listener pushed. Create one Data Layer Variable for each key. In my build they are dlv ghl.form_id, which reads ghl_form_id, and dlv ghl.event_type, which reads ghl_event_type. Keep the names flat and boring, because nested keys are where most mapping mistakes hide.&lt;/p&gt;

&lt;p&gt;Then create a Custom Event trigger with the event name ghl_form_submit. This trigger is the moment a real lead happens, so every lead tag in your container can use it. If you are not sure how your data layer should look, build it with my &lt;a href="https://mdniamul.com/free-datalayer-generator/" rel="noopener noreferrer"&gt;free dataLayer code generator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to Variables, then New, and choose Data Layer Variable. Enter ghl_form_id as the name.&lt;/li&gt;
&lt;li&gt;Repeat for ghl_event_type.&lt;/li&gt;
&lt;li&gt;Go to Triggers, then New, and choose Custom Event.&lt;/li&gt;
&lt;li&gt;Type ghl_form_submit as the event name and name the trigger ce ghl_form_submit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo6w1fitzn868xkaz0cxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo6w1fitzn868xkaz0cxl.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Send a GA4 generate_lead event and mark it as a key event
&lt;/h2&gt;

&lt;p&gt;Create a GA4 Event tag. Pick your existing Google tag or Measurement ID, type generate_lead as the event name, and fire it on the ce ghl_form_submit trigger. I use generate_lead because it is a standard GA4 event name that reports and Google Ads already understand.&lt;/p&gt;

&lt;p&gt;You can add the form ID as an event parameter too, so you can see which form brought which lead. After the first test lead appears in GA4, go to Admin, then Events, and mark generate_lead as a key event. Only then does GA4 count it as a conversion. If you want a second pair of eyes on the setup, here is my &lt;a href="https://mdniamul.com/gohighlevel-form-conversion-tracking-services/" rel="noopener noreferrer"&gt;done-for-you GoHighLevel tracking setup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new tag and choose Google Analytics: GA4 Event.&lt;/li&gt;
&lt;li&gt;Enter your Measurement ID or pick the Google tag variable.&lt;/li&gt;
&lt;li&gt;Set the event name to generate_lead.&lt;/li&gt;
&lt;li&gt;Choose the ce ghl_form_submit trigger and save.&lt;/li&gt;
&lt;li&gt;In GA4, mark generate_lead as a key event after the first lead arrives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz1s0u8eojev7a8uvaa4i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz1s0u8eojev7a8uvaa4i.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Test the lead, handle consent and add server-side if you need it
&lt;/h2&gt;

&lt;p&gt;Open Preview mode, load your page and submit a real test lead. Check three things: the ghl_form_submit event shows in the left panel, the GA4 tag fires on it, and the event appears in GA4 DebugView. My &lt;a href="https://mdniamul.com/free-ga4-event-checker/" rel="noopener noreferrer"&gt;free tool to check GA4 events&lt;/a&gt; helps you check what reaches GA4. Only then click Submit and publish.&lt;/p&gt;

&lt;p&gt;Two things to plan for. First, consent: if your visitors need to give consent, pass the consent signals with Google Consent Mode v2 so GA4 tags fire only when allowed. You can test your banner with my &lt;a href="https://mdniamul.com/free-consent-mode-checker/" rel="noopener noreferrer"&gt;Consent Mode checker&lt;/a&gt;. Second, ad blockers and Safari can still drop browser requests. A server-side container on Stape sends the same event from your own subdomain, which keeps more of your real leads. That is an upgrade, and the web setup works on its own. If you also send these leads to Google Ads, read my &lt;a href="https://mdniamul.com/blog/track-gohighlevel-form-leads-google-ads-enhanced-conversions/" rel="noopener noreferrer"&gt;GoHighLevel enhanced conversions guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run a test lead in Preview mode and confirm the event, the tag and DebugView.&lt;/li&gt;
&lt;li&gt;Publish the container with a clear version name.&lt;/li&gt;
&lt;li&gt;Check GA4 key events after a day.&lt;/li&gt;
&lt;li&gt;Add Consent Mode v2 if you serve visitors who must give consent.&lt;/li&gt;
&lt;li&gt;When the basics are stable, add the server-side route on Stape.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxiapmvzjsgcl688pupol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxiapmvzjsgcl688pupol.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why can't GTM track my GoHighLevel form with the normal form trigger?
&lt;/h3&gt;

&lt;p&gt;Most GoHighLevel forms load in an iframe from another domain. Browsers stop your page from reading inside it, so the form submission trigger sees nothing. You need a message listener instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which GA4 event should I use for a GoHighLevel lead?
&lt;/h3&gt;

&lt;p&gt;Use generate_lead. It is a standard GA4 event name, and you can mark it as a key event so GA4 counts it as a conversion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need server-side tracking for GoHighLevel forms?
&lt;/h3&gt;

&lt;p&gt;No. The web container setup works on its own. A server-side container on Stape adds resilience against ad blockers and Safari limits, but it is an upgrade.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where do I check that the event reached GA4?
&lt;/h3&gt;

&lt;p&gt;Use GTM Preview mode first, then GA4 DebugView and Realtime. After about a day, check that generate_lead shows in your key events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GoHighLevel forms usually live in an iframe, so GTM cannot read them with the normal form trigger.&lt;/li&gt;
&lt;li&gt;A short Custom HTML listener catches the form's submit message and pushes ghl_form_submit into the data layer.&lt;/li&gt;
&lt;li&gt;Data layer variables and one Custom Event trigger connect that event to any tag you want.&lt;/li&gt;
&lt;li&gt;A GA4 generate_lead event, marked as a key event, turns the submit into a counted conversion.&lt;/li&gt;
&lt;li&gt;Test in Preview mode and DebugView before you publish.&lt;/li&gt;
&lt;li&gt;Add Consent Mode v2 where needed, and a server-side container on Stape if you want more resilience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;To track GoHighLevel lead forms in GA4 with Google Tag Manager, add a Custom HTML listener that catches the iframe form's submit message, push a ghl_form_submit event into the data layer, create data layer variables and a custom event trigger, and send a GA4 generate_lead event marked as a key event. This guide is for agencies and lead-gen businesses whose GoHighLevel leads do not show in GA4. Test in Preview mode and DebugView, add Consent Mode v2, and use optional server-side tracking on Stape for more accuracy.&lt;/p&gt;

&lt;p&gt;Want the full written guide with the code? It is here: &lt;a href="https://mdniamul.com/gohighlevel-form-conversion-tracking-services/" rel="noopener noreferrer"&gt;https://mdniamul.com/gohighlevel-form-conversion-tracking-services/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do the leads in your GoHighLevel CRM match what GA4 shows right now?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD Niamul&lt;br&gt;&lt;br&gt;
Conversion Tracking and Web Analytics Specialist, Digital Soldier Agency&lt;/p&gt;

</description>
      <category>gohighlevel</category>
      <category>googletagmanager</category>
      <category>ga4</category>
      <category>analytics</category>
    </item>
    <item>
      <title>Track GoHighLevel Form Leads with Google Ads Enhanced Conversions (GTM)</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Sat, 31 Oct 2026 10:13:39 +0000</pubDate>
      <link>https://dev.to/mdniamul0/track-gohighlevel-form-leads-with-google-ads-enhanced-conversions-gtm-1dd</link>
      <guid>https://dev.to/mdniamul0/track-gohighlevel-form-leads-with-google-ads-enhanced-conversions-gtm-1dd</guid>
      <description>&lt;p&gt;Say your GoHighLevel CRM shows 40 new leads this week and Google Ads shows 18. Nobody is lying. Google Ads just never saw the rest.&lt;/p&gt;

&lt;p&gt;To track GoHighLevel form leads with Google Ads enhanced conversions, you catch the form's submit message with a small listener in Google Tag Manager, push the lead's email and phone into the data layer, and hand that data to your Google Ads conversion tag. Google hashes it with SHA-256 and uses it to match the lead to the ad click.&lt;/p&gt;

&lt;p&gt;This matters because Smart Bidding learns from the leads it can see. Miss half of them and it bids on weak signals, so your cost per lead creeps up while the real lead count stays flat. I find this in audits all the time, and it is the daily work I do as a &lt;a href="https://mdniamul.com/gohighlevel-conversion-tracking-specialist/" rel="noopener noreferrer"&gt;GoHighLevel tracking specialist&lt;/a&gt;. Below is the five-step version of the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch GoHighLevel form leads Tracking
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/S46ADbOAtZI" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: See why GoHighLevel form leads go missing in Google Ads
&lt;/h2&gt;

&lt;p&gt;Most GoHighLevel forms sit on your page inside an iframe. Think of an iframe as a glass window in a brick wall. Your landing page is the wall and the form is a separate room behind the glass. Your tag manager can tell that something happened, but it cannot read what the visitor typed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browsers stop your page from reading inside a form that lives on another domain. This is called the same-origin rule.&lt;/li&gt;
&lt;li&gt;So the normal GTM form submit trigger sees nothing, and a form field variable comes back empty.&lt;/li&gt;
&lt;li&gt;A thank-you page redirect can still count the lead, but it carries no email or phone to match.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enhanced conversions for leads is the part that sends hashed email and phone with each lead. Google compares them with signed-in Google accounts to find the click that started the journey. Without it you depend on cookies alone, and cookies get lost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open your landing page and check how the GoHighLevel form is added: an iframe embed or a link to a hosted page.&lt;/li&gt;
&lt;li&gt;Submit one real test lead and note what you see in GoHighLevel. Check Google Ads later, because conversions can take a few hours to show.&lt;/li&gt;
&lt;li&gt;Write down the gap. That is your starting point.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F76p0ass8t5pn4ls9hyhp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F76p0ass8t5pn4ls9hyhp.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Catch the form signal with a listener in Google Tag Manager
&lt;/h2&gt;

&lt;p&gt;A GoHighLevel form sends a message out of the iframe when someone submits it. Your page can listen for that message. It is called a postMessage listener, and it works because the message is built to cross the glass.&lt;/p&gt;

&lt;p&gt;I add the listener as a Custom HTML tag that fires on Initialization, so it is ready before the form loads. When a message arrives, it checks that it is a form submit, reads the email, phone and name, and pushes an event called ghl_lead_submitted into the data layer. The push carries these keys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;event: ghl_lead_submitted&lt;/li&gt;
&lt;li&gt;enhanced_user_data.email and enhanced_user_data.phone_number&lt;/li&gt;
&lt;li&gt;enhanced_user_data.first_name and enhanced_user_data.last_name&lt;/li&gt;
&lt;li&gt;ghl_form_id, so you can tell your forms apart&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not trust field names blindly. GoHighLevel changes its forms from time to time, so log the message once in the browser console and match your keys to what you see. If you have not built the basic GoHighLevel conversion yet, start with my &lt;a href="https://mdniamul.com/blog/gohighlevel-form-google-ads-conversion-tracking-gtm/" rel="noopener noreferrer"&gt;basic GoHighLevel conversion setup guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In GTM, create a Custom HTML tag with a clear name, such as chtml GoHighLevel form listener.&lt;/li&gt;
&lt;li&gt;Add the listener code that watches for the message event coming from the form.&lt;/li&gt;
&lt;li&gt;Set the trigger to Initialization, All Pages.&lt;/li&gt;
&lt;li&gt;Open Preview, submit a test lead and check that ghl_lead_submitted appears in the left panel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv76jm9xmjpeelxi8pt2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv76jm9xmjpeelxi8pt2z.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Turn the lead data into GTM variables and a trigger
&lt;/h2&gt;

&lt;p&gt;Now GTM has to read what the listener pushed. Make one data layer variable for each key: email, phone number, first name, last name and the form ID. Then build one User-Provided Data variable that maps those fields in one place.&lt;/p&gt;

&lt;p&gt;You do not have to hash anything yourself in this setup. The Google tag cleans the values and hashes them with SHA-256 before they leave the browser. If you want to see what hashing does to an email, try my &lt;a href="https://mdniamul.com/free-hashing-code-generator/" rel="noopener noreferrer"&gt;free SHA-256 hashing tool&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Send clean values. Phone numbers should carry the country code and emails should be real addresses with no spaces. Weak data gives weak matching, and I would rather send three clean fields than ten messy ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create data layer variables for email, phone_number, first_name, last_name and ghl_form_id, using the enhanced_user_data path.&lt;/li&gt;
&lt;li&gt;Create a User-Provided Data variable, choose manual configuration and map each field to its variable.&lt;/li&gt;
&lt;li&gt;Create a Custom Event trigger for ghl_lead_submitted.&lt;/li&gt;
&lt;li&gt;Not sure how your data layer should look? Build the structure with my &lt;a href="https://mdniamul.com/free-datalayer-generator/" rel="noopener noreferrer"&gt;free dataLayer code generator&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj7yai1i59894dls9p09q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj7yai1i59894dls9p09q.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Turn on enhanced conversions and set up the Google Ads tag
&lt;/h2&gt;

&lt;p&gt;Start in Google Ads. Open your lead conversion action, find the enhanced conversions settings, tick the box and choose Google Tag Manager as the method. If you do not have a lead conversion action yet, create one first.&lt;/p&gt;

&lt;p&gt;Then go to GTM and open your Google Ads Conversion Tracking tag with the conversion ID and label. Tick the option to include user-provided data from your website, pick the variable from Step 3 and fire the tag on the ghl_lead_submitted trigger.&lt;/p&gt;

&lt;p&gt;In the video I also map extra fields such as state, city and postal code, for forms that collect them. More matching fields usually means a better match, but only send what you collected with permission.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In Google Ads, open the lead conversion action and turn on enhanced conversions with Google Tag Manager.&lt;/li&gt;
&lt;li&gt;In GTM, open the Google Ads Conversion Tracking tag and tick the box to include user-provided data.&lt;/li&gt;
&lt;li&gt;Select your User-Provided Data variable and set the trigger to ghl_lead_submitted.&lt;/li&gt;
&lt;li&gt;Map email, phone, first name and last name first. Add address fields only if your form collects them.&lt;/li&gt;
&lt;li&gt;Prefer to have it built and tested for you? Here is my &lt;a href="https://mdniamul.com/gohighlevel-form-conversion-tracking-services/" rel="noopener noreferrer"&gt;done-for-you GoHighLevel tracking setup&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzgo85e1oae4d1ldhe81d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzgo85e1oae4d1ldhe81d.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Test it, fix the usual errors and protect the data
&lt;/h2&gt;

&lt;p&gt;Use Preview mode and one real test lead. Check three things: the ghl_lead_submitted event appears, the Google Ads tag fires, and the user-provided data shows as sent with real values. Then open the diagnostics of your conversion action in Google Ads, which can take a day or two to update.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The event never fires: check that the form's iframe has no sandbox rule that blocks messages.&lt;/li&gt;
&lt;li&gt;Email or phone is undefined: GoHighLevel may have renamed a field. Read the message in the console and fix the data layer path.&lt;/li&gt;
&lt;li&gt;Status says Needs attention: the User-Provided Data variable is missing or the format is wrong. Add the country code to phone numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two more things. First, consent: if you serve visitors in regions that need it, collect consent first and pass the signals along. Test your banner with my &lt;a href="https://mdniamul.com/free-consent-mode-checker/" rel="noopener noreferrer"&gt;Consent Mode checker&lt;/a&gt;. Second, ad blockers and Safari can still drop browser requests, so you can send the same conversion from a server container on Stape. For that route, read my &lt;a href="https://mdniamul.com/blog/track-gohighlevel-lead-forms-ga4-gtm-server-side/" rel="noopener noreferrer"&gt;server-side GoHighLevel tracking guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run a test lead in Preview mode and confirm the event, the tag and the sent data.&lt;/li&gt;
&lt;li&gt;Check the conversion diagnostics in Google Ads after a day or two.&lt;/li&gt;
&lt;li&gt;Add Consent Mode v2 if your visitors need to give consent.&lt;/li&gt;
&lt;li&gt;When the basics are stable, add the server-side route for extra reliability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F701i6thnfqh81882uc7d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F701i6thnfqh81882uc7d.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are enhanced conversions for leads in Google Ads?
&lt;/h3&gt;

&lt;p&gt;A feature that sends hashed first-party data, such as email and phone, from your lead form to Google. Google uses it to match the lead to an ad click when cookies alone fall short.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why can't Google Tag Manager read my GoHighLevel form fields?
&lt;/h3&gt;

&lt;p&gt;Most GoHighLevel forms load in an iframe from another domain. Browsers stop your page from reading inside it, so you need a message listener instead of a normal form trigger.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need to hash the email and phone myself?
&lt;/h3&gt;

&lt;p&gt;In a standard Google Tag Manager setup, no. The Google tag cleans the values and hashes them with SHA-256 before sending. You pass clean values and it handles the rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this work without server-side tracking?
&lt;/h3&gt;

&lt;p&gt;Yes. The web container version works on its own. A server container adds resilience against ad blockers and Safari limits, but it is an upgrade, not a requirement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GoHighLevel forms usually live in an iframe, so GTM cannot read the fields with a normal form trigger.&lt;/li&gt;
&lt;li&gt;A small postMessage listener catches the submit message and pushes the lead's email and phone into the data layer.&lt;/li&gt;
&lt;li&gt;One User-Provided Data variable and one custom event trigger connect that data to your Google Ads conversion tag.&lt;/li&gt;
&lt;li&gt;Turn on enhanced conversions in Google Ads and tick the user-provided data option in the tag.&lt;/li&gt;
&lt;li&gt;Test in Preview mode with a real lead, then check the conversion diagnostics a day or two later.&lt;/li&gt;
&lt;li&gt;Add Consent Mode v2, and a server container on Stape if you want more resilience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;To track GoHighLevel form leads with Google Ads enhanced conversions, use a Google Tag Manager listener to catch the form's submit message, push the lead's email and phone into the data layer, and pass them through a User-Provided Data variable to the Google Ads conversion tag. This guide is for agencies and lead-gen businesses whose CRM shows more leads than Google Ads. Turn on enhanced conversions in Google Ads, test in Preview mode, fix the common errors, and add Consent Mode v2 and optional server-side tracking.&lt;/p&gt;

&lt;p&gt;Want the full written guide with the code? It is here: &lt;a href="https://mdniamul.com/blog/track-gohighlevel-form-leads-google-ads-enhanced-conversions/" rel="noopener noreferrer"&gt;https://mdniamul.com/blog/track-gohighlevel-form-leads-google-ads-enhanced-conversions/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does your GoHighLevel CRM show more leads than Google Ads right now, and by how much?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD Niamul&lt;br&gt;&lt;br&gt;
Conversion Tracking and Web Analytics Specialist, Digital Soldier Agency&lt;/p&gt;

</description>
      <category>gohighlevel</category>
      <category>googletagmanager</category>
      <category>analytics</category>
      <category>ai</category>
    </item>
    <item>
      <title>Shopify Shows the Sale. Meta, Google Ads and TikTok Don't. Here Is the 5-Step Fix</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Fri, 30 Oct 2026 19:57:00 +0000</pubDate>
      <link>https://dev.to/mdniamul0/shopify-shows-the-sale-meta-google-ads-and-tiktok-dont-here-is-the-5-step-fix-562e</link>
      <guid>https://dev.to/mdniamul0/shopify-shows-the-sale-meta-google-ads-and-tiktok-dont-here-is-the-5-step-fix-562e</guid>
      <description>&lt;p&gt;Shopify reports one order count. Meta reports fewer. Google Ads reports a different number. TikTok misses most of your sales.&lt;/p&gt;

&lt;p&gt;The sales happened. The platforms just didn't see them. And platforms bid on what they see, so partial data means higher costs and weaker scaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the attribution gap comes from
&lt;/h2&gt;

&lt;p&gt;Platforms learn from the orders you report back. Five things quietly cut that signal, and each needs its own fix:&lt;/p&gt;

&lt;p&gt;• Ad blockers: the pixel never loads. Fix: server-side events on your own domain.&lt;br&gt;
• Safari ITP: script cookies last up to 7 days, possibly 24 hours after a tagged ad click, so returning buyers look new. Fix: cookies set by your own server.&lt;br&gt;
• Declined consent: pixels wait for agreement. Fix: respect the choice and send consent signals correctly.&lt;br&gt;
• Retired checkout scripts: Shopify Plus additional scripts stopped running on August 28, 2025. Fix: customer events plus server-side purchase events.&lt;br&gt;
• Duplicate setups: an app and GTM both send Purchase. Fix: one source per event.&lt;/p&gt;

&lt;p&gt;Think of each ad platform as a commissioned salesperson. It needs to hear about every sale it really made, once. Server-side tracking delivers that news from a server you control, through each platform's official API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Audit and build one tracking map
&lt;/h3&gt;

&lt;p&gt;Before you add anything, find what already exists. Review Shopify customer events (app pixels and custom pixels), list every app that adds tracking, and search theme.liquid for gtag, fbq, ttq and GTM IDs. Check whether anything still depends on the retired additional scripts.&lt;/p&gt;

&lt;p&gt;Then write a simple map: page_view, view_item, add_to_cart, begin_checkout and purchase. For each, note the destination and whether it is sent from the browser, the server, or both. Circle every event with two sources. Those are your double-count risks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqoquwiaknx8r3z1k0t8x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqoquwiaknx8r3z1k0t8x.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Build the server on your own domain
&lt;/h3&gt;

&lt;p&gt;Create a Server GTM container, host it on Stape, and give it a custom subdomain on your store's domain. For the longest Safari cookie lifetime, use a same-origin setup or Stape's Own CDN. A subdomain on a different IP range can still hit the 7-day limit.&lt;/p&gt;

&lt;p&gt;Then install the Stape Conversion Tracking app, add both container IDs, and turn on data layer events plus the purchase and refund webhooks. The webhooks send orders from Shopify's own server, so a closed tab or a blocker can't hide them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fikuhvbnsugk82jx67ush.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fikuhvbnsugk82jx67ush.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Connect each channel once
&lt;/h3&gt;

&lt;p&gt;One server container can feed every channel from the same clean events. The deduplication rule differs by platform:&lt;/p&gt;

&lt;p&gt;• Meta: Pixel in the browser plus Conversions API on the server. Same event name and event ID, within 48 hours. Send hashed email and phone, plus fbp and fbc, to lift Event Match Quality.&lt;br&gt;
• Google Ads: Conversion Linker on all events, and a Conversion tag on purchase with value, currency and transaction ID. Turn on Enhanced Conversions.&lt;br&gt;
• TikTok: Pixel plus Events API with the same event_id from both sides. Pass hashed identifiers and ttclid when you have them.&lt;/p&gt;

&lt;p&gt;For every platform, choose one source: the Shopify app or Server GTM. Not both.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9tn68mtg5lovhnr4hj8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9tn68mtg5lovhnr4hj8.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Treat Klaviyo and Clarity differently
&lt;/h3&gt;

&lt;p&gt;Klaviyo can run partly from the server. Keep the native Shopify sync and its Placed Order event, and add server events such as view_item and add_to_cart when you know the email. Never send a second order event under a new name, or you will see two order metrics.&lt;/p&gt;

&lt;p&gt;Clarity and Hotjar are different. They record the page, so they must run in the browser, and consent is what matters. Since October 31, 2025, Clarity needs a consent signal for visitors in the EEA, UK and Switzerland, or it runs without cookies. Pass Shopify's consent choice to the tool and test both banner choices.&lt;/p&gt;

&lt;p&gt;Server-side tracking is not a way around consent. Follow each visitor's choice on every channel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpkd5wnk0m5xlvddyugmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpkd5wnk0m5xlvddyugmp.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: QA, document and hand over
&lt;/h3&gt;

&lt;p&gt;Preview both containers and follow one visitor all the way to purchase. Then place real test orders and compare order ID, value and currency in Shopify, GA4, Meta, Google Ads and TikTok:&lt;/p&gt;

&lt;p&gt;• GTM Preview: web and server events with matching IDs&lt;br&gt;
• Meta Test Events: browser and server events merged&lt;br&gt;
• Google Ads conversion status and Enhanced Conversions diagnostics&lt;br&gt;
• TikTok Events Manager: both connection methods&lt;br&gt;
• GA4 DebugView: transaction details&lt;br&gt;
• Klaviyo activity feed: one server event per action&lt;/p&gt;

&lt;p&gt;Compare platform orders with Shopify every week for the first month. Then write the playbook: event map, tags and triggers, token owners and test steps, so your team can run it without you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F157k0j28azy7p8q5w8nf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F157k0j28azy7p8q5w8nf.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;• Plus stores lose the record of the sale, not the sale itself&lt;br&gt;
• Retired additional scripts, Safari cookie limits, blockers, consent and duplicates each need a different fix&lt;br&gt;
• Audit first and build one tracking map, with one source per event&lt;br&gt;
• One server container on your own domain can feed Meta, Google Ads, TikTok, GA4 and Klaviyo&lt;br&gt;
• Share one event ID (Meta, TikTok) or transaction ID (Google, GA4) so each order counts once&lt;br&gt;
• Clarity and Hotjar stay in the browser, and consent decides what they can do&lt;/p&gt;

&lt;p&gt;The complete step-by-step guide, with the full checklist, testing workflow and FAQ, is here:&lt;br&gt;
&lt;a href="https://mdniamul.com/blog/shopify-plus-marketing-attribution-server-side-tracking-guide/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you run a Shopify Plus store, which platform's order count is furthest from Shopify's right now: Meta, Google Ads, or TikTok?&lt;/p&gt;

&lt;p&gt;— MD Niamul&lt;br&gt;
Conversion Tracking &amp;amp; Web Analytics Specialist | Digital Soldier Agency&lt;br&gt;
Want your Shopify tracking checked? My DMs are open.&lt;/p&gt;

&lt;h1&gt;
  
  
  ShopifyPlus #ServerSideTracking #MetaConversionsAPI #GA4 #GoogleTagManager
&lt;/h1&gt;

</description>
      <category>tagmanager</category>
      <category>shopifytracking</category>
      <category>google</category>
      <category>metaads</category>
    </item>
    <item>
      <title>Before You Launch Ads: The Meta CAPI + Stape Tracking Checklist That Protects Your Budget</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Fri, 30 Oct 2026 04:32:00 +0000</pubDate>
      <link>https://dev.to/mdniamul0/before-you-launch-ads-the-meta-capi-stape-tracking-checklist-that-protects-your-budget-42c8</link>
      <guid>https://dev.to/mdniamul0/before-you-launch-ads-the-meta-capi-stape-tracking-checklist-that-protects-your-budget-42c8</guid>
      <description>&lt;p&gt;You can launch an ad campaign in an afternoon. You can't get back the budget that ran on broken tracking.&lt;/p&gt;

&lt;p&gt;Here is the five-step check I run before any campaign goes live, so every purchase reaches Meta, Google Ads and GA4 once, with the right value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why purchases go missing
&lt;/h2&gt;

&lt;p&gt;Most ad accounts don't fail at the ad. They fail at the hand-off. A visitor clicks an ad, lands on your site, fills in a GoHighLevel form, moves to a checkout, and pays. Every jump is a place where the browser can lose the signal: ad blockers, cookie limits, a new domain, a payment page that never loads your tags.&lt;/p&gt;

&lt;p&gt;Think of browser tracking as a courier who can be stopped at any door. Server-side tracking is a direct line from your own server to the ad platform. With server-side GTM hosted on Stape, on your own subdomain, the purchase is sent from a server you control instead of a browser that may block it.&lt;/p&gt;

&lt;p&gt;But server-side tracking is not a magic switch. It needs the five checks below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Map the funnel
&lt;/h3&gt;

&lt;p&gt;Write down the path: Ad, Website, GoHighLevel form or checkout, Payment, Purchase. For each jump, note what must survive: the campaign data, the order ID and the order value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa48ywqguuphtz8bqz7bi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa48ywqguuphtz8bqz7bi.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you can't say where the purchase event is born, you can't prove that it arrived.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Preserve attribution
&lt;/h3&gt;

&lt;p&gt;Capture UTMs and click IDs (fbclid, gclid, gbraid, wbraid) the moment someone lands. Store them first-party, then carry them into the form as hidden fields, through the checkout, and onto the server event. Meta also uses the _fbc and _fbp cookies to match the click to the browser, so keep them intact.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspht1smxbe2epqmilk2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspht1smxbe2epqmilk2l.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The goal is a chain you can read in your reports: Campaign, Ad set, Ad, Conversion, Purchase, within each platform's own attribution and privacy limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Send each event once
&lt;/h3&gt;

&lt;p&gt;When the browser Pixel and the server (Conversions API) both send a Purchase, Meta needs to know it is the same sale. Send the same event name and the same event ID from both sides, and Meta keeps one.&lt;/p&gt;

&lt;p&gt;Skip the shared ID and you risk double counting. That inflates purchases and makes your ROAS look better than it is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fntc3q7gi1nxhsu27b4gc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fntc3q7gi1nxhsu27b4gc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Make the purchase data trustworthy
&lt;/h3&gt;

&lt;p&gt;Every purchase should carry a transaction ID, the order value and the currency. In GA4, the transaction ID stops repeat counts. In Google Ads, add Enhanced Conversions so hashed first-party data (email or phone, hashed with SHA-256) helps match the conversion, and send it only where you have the right consent.&lt;/p&gt;

&lt;p&gt;A purchase with no value is just a lead in disguise. Smart bidding can't optimise for revenue without it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq1xqxspbja4frlx580pj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq1xqxspbja4frlx580pj.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Validate before launch, recheck after
&lt;/h3&gt;

&lt;p&gt;Run a real test purchase through the full funnel and watch it land in each tool:&lt;/p&gt;

&lt;p&gt;• Meta Events Manager: Test Events, plus a check that browser and server events are merged&lt;br&gt;
• GTM Preview and the server container preview&lt;br&gt;
• Stape logs: request received, request sent&lt;br&gt;
• GA4 DebugView and Realtime&lt;br&gt;
• Google Ads conversion status&lt;/p&gt;

&lt;p&gt;Then compare the platforms against your real orders during the first days of live traffic. Small drift is normal. A growing gap means something broke.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr84d9xxo8eax1cyznpw2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr84d9xxo8eax1cyznpw2.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A note for health and other restricted categories&lt;/p&gt;

&lt;p&gt;If your business sits in a category that Meta restricts (health is a common one), treat the rules as part of the setup. Send only event data that is allowed, keep health details and personal data out of event parameters, and read Meta's business tools terms before you design your events.&lt;/p&gt;

&lt;p&gt;Tracking that works with platform policy lasts. Tracking built to hide what a business does does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;• Most tracking loss happens at the hand-offs (site, checkout, payment), so test every jump&lt;br&gt;
• Capture UTMs and click IDs on landing and carry them all the way to the order&lt;br&gt;
• Share one event name and one event ID between Pixel and CAPI to avoid double counting&lt;br&gt;
• Every purchase needs a transaction ID, a value and a currency&lt;br&gt;
• Test with a real purchase before launch, then recheck during the first days live&lt;/p&gt;

&lt;p&gt;**My full guide to Meta Pixel and Conversions API with server-side GTM and Stape is here:&lt;br&gt;
**&lt;a href="https://mdniamul.com/blog/meta-pixel-conversions-api-capi-sgtm-stape/" rel="noopener noreferrer"&gt;https://mdniamul.com/blog/meta-pixel-conversions-api-capi-sgtm-stape/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you last launched a campaign, how did you confirm that a purchase was counted once, and only once?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;— MD Niamul&lt;br&gt;
Conversion Tracking &amp;amp; Web Analytics Specialist | Digital Soldier Agency&lt;/strong&gt;&lt;br&gt;
Need your funnel checked before launch? My DMs are open.&lt;/p&gt;

&lt;h1&gt;
  
  
  ConversionTracking #ServerSideTracking #MetaConversionsAPI #GoogleTagManager #GA4
&lt;/h1&gt;

</description>
      <category>gtm</category>
      <category>meta</category>
      <category>ga4</category>
      <category>ai</category>
    </item>
    <item>
      <title>Server-Side Tracking Explained: GTM Server Container, GA4 and Stape in 2026</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Fri, 30 Oct 2026 00:26:17 +0000</pubDate>
      <link>https://dev.to/mdniamul0/server-side-tracking-explained-gtm-server-container-ga4-and-stape-in-2026-4ip3</link>
      <guid>https://dev.to/mdniamul0/server-side-tracking-explained-gtm-server-container-ga4-and-stape-in-2026-4ip3</guid>
      <description>&lt;p&gt;A plain guide to server-side tracking: why browser tracking loses conversions and how a GTM server container on Stape sends clean data to GA4, Google Ads and Meta.&lt;/p&gt;

&lt;p&gt;Your ads say 20 sales. Your store says 40. The other 20 did not vanish. Your tracking just never saw them.&lt;/p&gt;

&lt;p&gt;Server-side tracking sends your conversion data from your own server to GA4, Google Ads and Meta, instead of leaving it all to the visitor's browser. Ad blockers and Safari cookie limits cannot cut that route off as easily, so your marketing attribution gets closer to what really happened.&lt;/p&gt;

&lt;p&gt;This matters because Google Ads and Meta learn from the sales they can see. If they see half, they bid on weak signals. You end up pausing campaigns that work and feeding ones that don't. I see this in audits almost every week, and it is the daily work I do as a &lt;a href="https://mdniamul.com/attribution-server-side-tracking-specialist/" rel="noopener noreferrer"&gt;server-side tracking specialist&lt;/a&gt;. Below is the five-step version of the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: See why browser tracking misses your sales
&lt;/h2&gt;

&lt;p&gt;A normal pixel runs in the visitor's browser, and the browser is not on your side. Three things get in the way.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ad blockers stop the pixel before it fires, so the sale is never sent.&lt;/li&gt;
&lt;li&gt;Safari limits cookies that JavaScript sets, often to 7 days and sometimes to 24 hours. A buyer who comes back next week looks like a brand new visitor.&lt;/li&gt;
&lt;li&gt;Consent choices. When a visitor says no to tracking, a properly built site respects that.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How big the gap is depends on your audience and your site, so I won't quote one fixed number. What I can tell you is that the gap is real, and it is usually bigger than owners expect.&lt;/p&gt;

&lt;p&gt;Take the example from the cover. The store records 40 orders and the ad platform sees 20. Meta then optimises toward the 20 it can see and ignores the rest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Place one real test order on your store, or send one real test lead.&lt;/li&gt;
&lt;li&gt;Find it in your store, GA4, Google Ads and Meta, and note which ones show it.&lt;/li&gt;
&lt;li&gt;Write down the gap for each platform. That is your starting point.&lt;/li&gt;
&lt;li&gt;Estimate the size of the gap with my &lt;a href="https://mdniamul.com/free-tracking-loss-calculator/" rel="noopener noreferrer"&gt;tracking loss calculator&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" alt="Three boxes showing ad blockers, Safari cookie limits and consent choices, with a bar chart where the ad platform sees 20 sales and the store records 40" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdeu8fbrg4mm45jfy76qn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdeu8fbrg4mm45jfy76qn.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Understand what server-side tracking does
&lt;/h2&gt;

&lt;p&gt;Think of browser tracking as asking every customer to post their own receipt to the ad platform. Some forget. Some use a blocker. Some throw it away.&lt;/p&gt;

&lt;p&gt;Server-side tracking is your own shop sending the receipts in one clean batch. The sale is reported from a server you control, not from a visitor's phone or laptop.&lt;/p&gt;

&lt;p&gt;It is still tracking, so it is not a loophole. It is a more reliable way to send the same sale, and it still has to follow your consent rules. If you want the long version, read my &lt;a href="https://mdniamul.com/blog/server-side-tracking-masterclass-google-ads-roi/" rel="noopener noreferrer"&gt;full server-side tracking guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List the events the server should send: purchase or lead first, then add to cart and checkout start.&lt;/li&gt;
&lt;li&gt;Make sure you have access to the site, the tag manager and the ad accounts before you build, or hand the build over through my &lt;a href="https://mdniamul.com/ecommerce-server-side-tracking-service/" rel="noopener noreferrer"&gt;server-side tracking setup service&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" alt="Two lanes comparing browser tracking, where the sale is blocked on the way to ad platforms, and server-side tracking, where your own server sends it" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjspu5x69ezomvfo0c760.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjspu5x69ezomvfo0c760.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Set up the GTM server container on Stape
&lt;/h2&gt;

&lt;p&gt;Your site still has a normal Google Tag Manager web container. The difference is where it sends the data.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The web container sends events to a Google Tag Manager server container on your own subdomain, for example data.yourstore.com.&lt;/li&gt;
&lt;li&gt;The server container runs on a host. Stape is the one I use, and I am an official Stape partner, so you should know that.&lt;/li&gt;
&lt;li&gt;From there the server container forwards the events to GA4, Google Ads and the Meta Conversions API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You are not tied to Stape. Any server GTM host works. I use it because setup is quick and it handles the custom domain properly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a server container in Google Tag Manager.&lt;/li&gt;
&lt;li&gt;Host it on Stape or another server GTM host and add a custom subdomain such as data.yourstore.com.&lt;/li&gt;
&lt;li&gt;Point your web container's GA4 tag at that subdomain.&lt;/li&gt;
&lt;li&gt;Add the GA4, Google Ads and Meta Conversions API tags in the server container.&lt;/li&gt;
&lt;li&gt;Open Preview mode, run a test order and watch each event arrive.&lt;/li&gt;
&lt;li&gt;Run my &lt;a href="https://mdniamul.com/free-server-side-tracking-checker/" rel="noopener noreferrer"&gt;server-side tracking checker&lt;/a&gt; on your site to see what is firing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" alt="Flow from your site and GTM web container to a GTM server container hosted on Stape, then to GA4, Google Ads and the Meta Conversions API" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1yn0plah75c8i2zltie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1yn0plah75c8i2zltie.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Match each sale to its ad click
&lt;/h2&gt;

&lt;p&gt;Attribution is the job of matching a sale to the ad click that started it. Three pieces make that match stronger.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A first-party cookie, set from your own domain by your server. When it is set up correctly it lasts longer than a cookie set by a script.&lt;/li&gt;
&lt;li&gt;Click IDs. The gclid from Google Ads and the fbclid from Meta travel with the conversion, so the platform can tie the sale to the click.&lt;/li&gt;
&lt;li&gt;Hashed customer data. Email and phone are hashed with SHA-256 before they leave your server, and the platform uses them only for matching.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this makes the numbers perfect. It makes the match better, and better matching gives the bidding system better signals. For the Meta side, my &lt;a href="https://mdniamul.com/blog/meta-pixel-conversions-api-capi-sgtm-stape/" rel="noopener noreferrer"&gt;Meta CAPI setup guide&lt;/a&gt; goes deeper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure the cookie is set from your own domain by the server.&lt;/li&gt;
&lt;li&gt;Save the gclid and fbclid with every lead or order.&lt;/li&gt;
&lt;li&gt;Send hashed email and phone with the conversion, as each platform allows.&lt;/li&gt;
&lt;li&gt;Check Event Match Quality in Meta Events Manager and the enhanced conversions diagnostics in Google Ads.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" alt="Three boxes listing first-party cookie, click IDs gclid and fbclid, and hashed customer data used to match a sale to an ad click" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F69bh15v6wsa4mcbihhwl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F69bh15v6wsa4mcbihhwl.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Clean the data and close the loop
&lt;/h2&gt;

&lt;p&gt;Many setups send the same sale twice, once from the browser and once from the server. The fix is an event ID. Send the same ID with both and Meta counts one sale, not two.&lt;/p&gt;

&lt;p&gt;Lead-gen businesses have a second job. The sale happens later, in the CRM. Store the gclid when the lead comes in, then send closed deals back to Google Ads as offline conversions. Now the ads learn from revenue, not just form fills.&lt;/p&gt;

&lt;p&gt;Last, privacy. Server-side tracking does not replace Consent Mode v2. Your site still asks for consent, and your server has to honour the answer. If you only need Google tags served from your own domain, the Google tag gateway is a lighter option. A server container covers more platforms. Test your banner with my &lt;a href="https://mdniamul.com/free-consent-mode-checker/" rel="noopener noreferrer"&gt;Consent Mode checker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send the same event ID with the browser event and the server event.&lt;/li&gt;
&lt;li&gt;Use Meta Test Events and GA4 DebugView to confirm each sale counts once.&lt;/li&gt;
&lt;li&gt;Turn on Consent Mode v2 and pass the consent signals to the server container.&lt;/li&gt;
&lt;li&gt;For leads, import closed CRM deals back into Google Ads as offline conversions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/paste-image-link-here" alt="Three columns covering event IDs to stop double counting, sending CRM sales back to Google Ads, and keeping Consent Mode v2" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcc5hcf2036wl1w2zc1ed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcc5hcf2036wl1w2zc1ed.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why do Meta and Google Ads show fewer sales than my store?
&lt;/h3&gt;

&lt;p&gt;Browser tracking misses orders because of ad blockers, Safari cookie limits and consent choices. Each platform also counts sales with its own attribution window, so the numbers rarely match exactly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does server-side tracking get around ad blockers?
&lt;/h3&gt;

&lt;p&gt;It helps, because the sale is sent from your own server to the platforms. The first step from the browser to your own domain can still be blocked by some tools, so expect better data, not perfect data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does server-side tracking replace Consent Mode v2?
&lt;/h3&gt;

&lt;p&gt;No. It changes how data travels, not whether you need permission. Your site still collects consent and your server must respect the choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I avoid double counting with the Meta Conversions API?
&lt;/h3&gt;

&lt;p&gt;Send the same event ID with the browser event and the server event. Meta uses it to match the two and count one sale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ad blockers, Safari cookie limits and consent choices hide part of your conversions from Google Ads and Meta.&lt;/li&gt;
&lt;li&gt;Server-side tracking sends the sale from a server you control to GA4, Google Ads and the Meta Conversions API.&lt;/li&gt;
&lt;li&gt;A GTM server container on a host like Stape does the forwarding, from your own subdomain.&lt;/li&gt;
&lt;li&gt;First-party cookies, click IDs and hashed data help match each sale to its click.&lt;/li&gt;
&lt;li&gt;Use event IDs to stop double counting, and send CRM sales back to Google Ads as offline conversions.&lt;/li&gt;
&lt;li&gt;Keep Consent Mode v2 in place. Server-side tracking is not a way around consent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Server-side tracking sends conversion data from your own server to GA4, Google Ads and the Meta Conversions API, not just from the browser. This guide is for store owners, lead-gen businesses and agencies whose ads report fewer sales than their store. It explains why ad blockers, Safari cookie limits and consent choices hide conversions, how a Google Tag Manager server container on Stape works, how first-party cookies, click IDs and hashed data improve marketing attribution, and how event IDs keep the numbers clean.&lt;/p&gt;

&lt;p&gt;Want this set up for your store, lead-gen funnel or client accounts? Here is how I do server-side tracking: &lt;a href="https://mdniamul.com/server-side-tracking-service/" rel="noopener noreferrer"&gt;https://mdniamul.com/server-side-tracking-service/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where is your biggest gap right now: Meta, Google Ads, or CRM sales that never match your store?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD Niamul&lt;br&gt;&lt;br&gt;
Conversion Tracking and Web Analytics Specialist, Digital Soldier Agency&lt;/p&gt;

</description>
      <category>servertracking</category>
      <category>googletagmanager</category>
      <category>analytics</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sending GoHighLevel Won Deals to Google Ads and Meta CAPI with Webhooks and Server-Side GTM Setup</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Thu, 29 Oct 2026 04:21:10 +0000</pubDate>
      <link>https://dev.to/mdniamul0/sending-gohighlevel-won-deals-to-google-ads-and-meta-capi-with-webhooks-and-server-side-gtm-setup-4i3g</link>
      <guid>https://dev.to/mdniamul0/sending-gohighlevel-won-deals-to-google-ads-and-meta-capi-with-webhooks-and-server-side-gtm-setup-4i3g</guid>
      <description>&lt;p&gt;When a GoHighLevel lead books a call and buys three weeks later, Google Ads and Meta usually never hear about it. They only see the form fill, so they keep optimizing for cheap leads instead of buyers.&lt;/p&gt;

&lt;p&gt;In this video I walk through a three-step fix:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save the GCLID, fbclid and UTM tags in hidden GoHighLevel form fields.&lt;/li&gt;
&lt;li&gt;Fire a webhook when an opportunity moves to Won, with the deal value.&lt;/li&gt;
&lt;li&gt;Send it through server-side Google Tag Manager to Google Ads enhanced conversions for leads and the Meta Conversions API.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Watch the video: &lt;a href="https://youtu.be/AfY5LUFwR3c" rel="noopener noreferrer"&gt;https://youtu.be/AfY5LUFwR3c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Need help setting this up? WhatsApp +8801776485758 or visit &lt;a href="https://mdniamul.com" rel="noopener noreferrer"&gt;https://mdniamul.com&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Server-Side Tracking Explained: A Simple Plain-English Guide to GTM Server Containers, GA4 and Stape</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Tue, 27 Oct 2026 13:59:34 +0000</pubDate>
      <link>https://dev.to/mdniamul0/server-side-tracking-explained-a-simple-plain-english-guide-to-gtm-server-containers-ga4-and-stape-ec5</link>
      <guid>https://dev.to/mdniamul0/server-side-tracking-explained-a-simple-plain-english-guide-to-gtm-server-containers-ga4-and-stape-ec5</guid>
      <description>&lt;p&gt;*&lt;em&gt;Your ad platforms say 20 sales. Your store says 40. That gap is why server-side tracking matters in 2026.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
In this video I explain, in plain English:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why ad blockers, Safari cookie limits and consent cut browser-based tracking&lt;/li&gt;
&lt;li&gt;what a GTM server container is, and why I host it on Stape&lt;/li&gt;
&lt;li&gt;how GA4, Google Ads and the Meta Conversions API receive clean data from your server&lt;/li&gt;
&lt;li&gt;how first-party cookies, click IDs, hashed data and event IDs fix marketing attribution&lt;/li&gt;
&lt;li&gt;how to send closed CRM deals back to your ads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Watch the full video: &lt;a href="https://youtu.be/W4SE_z-tmzw" rel="noopener noreferrer"&gt;https://youtu.be/W4SE_z-tmzw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Need help setting it up? WhatsApp +8801776485758 or visit &lt;a href="https://mdniamul.com" rel="noopener noreferrer"&gt;https://mdniamul.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>gtm</category>
      <category>ga4</category>
      <category>ai</category>
    </item>
    <item>
      <title>Before You Launch Ads: The Meta CAPI + Stape Tracking Checklist That Protects Your Budget</title>
      <dc:creator>MD Niamul</dc:creator>
      <pubDate>Tue, 27 Oct 2026 13:55:38 +0000</pubDate>
      <link>https://dev.to/mdniamul0/before-you-launch-ads-the-meta-capi-stape-tracking-checklist-that-protects-your-budget-2d8j</link>
      <guid>https://dev.to/mdniamul0/before-you-launch-ads-the-meta-capi-stape-tracking-checklist-that-protects-your-budget-2d8j</guid>
      <description>&lt;p&gt;You can launch an ad campaign in an afternoon. You can't get back the budget that ran on broken tracking.&lt;/p&gt;

&lt;p&gt;Here is the five-step check I run before any campaign goes live, so every purchase reaches Meta, Google Ads and GA4 once, with the right value.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;## Why purchases go missing&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Most ad accounts don't fail at the ad. They fail at the hand-off. A visitor clicks an ad, lands on your site, fills in a GoHighLevel form, moves to a checkout, and pays. Every jump is a place where the browser can lose the signal: ad blockers, cookie limits, a new domain, a payment page that never loads your tags.&lt;/p&gt;

&lt;p&gt;Think of browser tracking as a courier who can be stopped at any door. Server-side tracking is a direct line from your own server to the ad platform. With server-side GTM hosted on Stape, on your own subdomain, the purchase is sent from a server you control instead of a browser that may block it.&lt;/p&gt;

&lt;p&gt;But server-side tracking is not a magic switch. It needs the five checks below.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;### Step 1: Map the funnel&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Write down the path: Ad, Website, GoHighLevel form or checkout, Payment, Purchase. For each jump, note what must survive: the campaign data, the order ID and the order value.&lt;/p&gt;

&lt;p&gt;If you can't say where the purchase event is born, you can't prove that it arrived.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frx9n56f3mydlnlr5f5m9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frx9n56f3mydlnlr5f5m9.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;### Step 2: Preserve attribution&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Capture UTMs and click IDs (fbclid, gclid, gbraid, wbraid) the moment someone lands. Store them first-party, then carry them into the form as hidden fields, through the checkout, and onto the server event. Meta also uses the _fbc and _fbp cookies to match the click to the browser, so keep them intact.&lt;/p&gt;

&lt;p&gt;The goal is a chain you can read in your reports: Campaign, Ad set, Ad, Conversion, Purchase, within each platform's own attribution and privacy limits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flvdnzfxwihsc2xpuaw8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flvdnzfxwihsc2xpuaw8b.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  **Step 3: Send each event once
&lt;/h3&gt;

&lt;p&gt;**&lt;br&gt;
When the browser Pixel and the server (Conversions API) both send a Purchase, Meta needs to know it is the same sale. Send the same event name and the same event ID from both sides, and Meta keeps one.&lt;/p&gt;

&lt;p&gt;Skip the shared ID and you risk double counting. That inflates purchases and makes your ROAS look better than it is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqvicmfu920y8cjkra9wb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqvicmfu920y8cjkra9wb.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  **Step 4: Make the purchase data trustworthy
&lt;/h3&gt;

&lt;p&gt;**&lt;br&gt;
Every purchase should carry a transaction ID, the order value and the currency. In GA4, the transaction ID stops repeat counts. In Google Ads, add Enhanced Conversions so hashed first-party data (email or phone, hashed with SHA-256) helps match the conversion, and send it only where you have the right consent.&lt;/p&gt;

&lt;p&gt;A purchase with no value is just a lead in disguise. Smart bidding can't optimise for revenue without it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fop2odgnrgch3kqszewqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fop2odgnrgch3kqszewqb.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  **Step 5: Validate before launch, recheck after
&lt;/h3&gt;

&lt;p&gt;**&lt;br&gt;
Run a real test purchase through the full funnel and watch it land in each tool:&lt;/p&gt;

&lt;p&gt;• Meta Events Manager: Test Events, plus a check that browser and server events are merged&lt;br&gt;
• GTM Preview and the server container preview&lt;br&gt;
• Stape logs: request received, request sent&lt;br&gt;
• GA4 DebugView and Realtime&lt;br&gt;
• Google Ads conversion status&lt;/p&gt;

&lt;p&gt;Then compare the platforms against your real orders during the first days of live traffic. Small drift is normal. A growing gap means something broke.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5j8c2a2315pjazsoeunc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5j8c2a2315pjazsoeunc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A note for health and other restricted categories&lt;/p&gt;

&lt;p&gt;If your business sits in a category that Meta restricts (health is a common one), treat the rules as part of the setup. Send only event data that is allowed, keep health details and personal data out of event parameters, and read Meta's business tools terms before you design your events.&lt;/p&gt;

&lt;p&gt;Tracking that works with platform policy lasts. Tracking built to hide what a business does does not.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h3&gt;
  
  
  Key takeaways
&lt;/h3&gt;

&lt;p&gt;**&lt;br&gt;
• Most tracking loss happens at the hand-offs (site, checkout, payment), so test every jump&lt;br&gt;
• Capture UTMs and click IDs on landing and carry them all the way to the order&lt;br&gt;
• Share one event name and one event ID between Pixel and CAPI to avoid double counting&lt;br&gt;
• Every purchase needs a transaction ID, a value and a currency&lt;br&gt;
• Test with a real purchase before launch, then recheck during the first days live&lt;/p&gt;

&lt;p&gt;My full guide to Meta Pixel and Conversions API with server-side GTM and Stape is here:&lt;br&gt;
&lt;a href="https://mdniamul.com/blog/meta-pixel-conversions-api-capi-sgtm-stape/" rel="noopener noreferrer"&gt;https://mdniamul.com/blog/meta-pixel-conversions-api-capi-sgtm-stape/&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
When you last launched a campaign, how did you confirm that a purchase was counted once, and only once?&lt;/p&gt;

&lt;p&gt;— MD Niamul&lt;br&gt;
Conversion Tracking &amp;amp; Web Analytics Specialist | Digital Soldier Agency&lt;br&gt;
Need your funnel checked before launch? My DMs are open.&lt;/p&gt;

&lt;h1&gt;
  
  
  ConversionTracking #ServerSideTracking #MetaConversionsAPI #GoogleTagManager #GA4
&lt;/h1&gt;

</description>
      <category>tracking</category>
    </item>
  </channel>
</rss>
