~/TechPurAI
~/tutorials/google-ads-mastery/conversion-tracking-setup
intermediate·part 11 of 22·3 min read

Setting up conversion tracking

Updated Aug 18, 2026Google Ads

Every part of this series so far — Quality Score, automated bidding, campaign goals — has quietly depended on conversion tracking already existing. This part is the actual technical setup: without it, Google Ads has no way to know which clicks actually turned into a subscription or a lead.

Installing the Google tag

html
<!-- In the <head> of every page on the site -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-XXXXXXXXX');
</script>

This base tag needs to load on every page of the site, not just the conversion confirmation page — it's what establishes the tracking session a later conversion event gets attributed back to. A site already using Google Tag Manager (the deferred-loading pattern covered in this site's own SEO series is a real example) typically installs this tag through GTM directly rather than hardcoding it in the page template.

Firing a real conversion: Bright Leaf Coffee's checkout confirmation

html
<!-- Only on the order confirmation page, after a successful purchase -->
<script>
  gtag('event', 'conversion', {
    'send_to': 'AW-XXXXXXXXX/AbC-D1234efGH',
    'value': 45.00,
    'currency': 'USD',
    'transaction_id': 'ORDER-10293'
  });
</script>

This snippet fires specifically on the page a customer sees after completing a purchase — never on the checkout form itself, since that would count every visit to the checkout page as a conversion, whether or not the purchase actually completed. value and currency are what make Target ROAS bidding (part 10) possible at all — without a real value attached, Google has no revenue figure to optimize a return ratio against. transaction_id prevents the same order from being counted twice if a customer refreshes the confirmation page.

GreenDesk: tracking a lead, not a purchase

html
<!-- On the "Thank you, we'll be in touch" page after a demo request form submits -->
<script>
  gtag('event', 'conversion', {
    'send_to': 'AW-XXXXXXXXX/EfG-H5678ijKL'
  });
</script>

A B2B lead-gen conversion (part 17 covers GreenDesk's full campaign) typically has no immediate dollar value to attach — the actual value is only known much later, once a sales team determines whether the lead converts to a paying customer. This is exactly the gap offline conversion tracking closes next.

Offline conversions: closing the loop after the initial lead

A form submission is only the first step of GreenDesk's real sales process — the actual valuable outcome (a closed deal) happens weeks later, offline, inside a CRM. Google Ads supports importing these later outcomes back in, matched to the original click via a stored click ID (gclid), so bidding can eventually optimize toward which leads actually became paying customers, not just which form submissions occurred.

text
1. Capture the gclid URL parameter when a lead first submits the form
2. Store it alongside the lead record in the CRM
3. When that lead closes as a paying customer, export it with its gclid and close value
4. Import that file into Google Ads as an offline conversion

This is a meaningfully more advanced setup than Bright Leaf Coffee's direct e-commerce tracking, and it's what separates a lead-gen account optimizing toward real revenue from one only ever optimizing toward form fills — a genuinely different, often much lower-value signal on its own.

Common mistake

Counting a form submission or a "started checkout" event as the primary conversion, without ever closing the loop on which of those actually became real revenue. Every bidding strategy in part 10 optimizes as aggressively as possible toward whatever's marked as the conversion — if that signal is a step removed from real business value, the automation optimizes toward the wrong outcome with total confidence.

Next: negative keywords — actively excluding the searches that showed up in the Search Terms report but were never going to convert.

VK

Vijay Kumar

Founder of TechPurAI — writing hands-on tutorials and honest tool breakdowns.

LinkedIn ↗
← previous10. Bidding strategies: manual CPC vs. automated biddingnext →12. Negative keywords: stopping wasted spend