๐Ÿ’ฐ Google Ads Conversion Tracking

Professional Setup via Google Tag Manager (Best Practice)

Why GTM instead of direct gtag.js?

  • โœ… Centralized tag management (all tags in one place)
  • โœ… No code changes needed (marketers can manage tags)
  • โœ… Better debugging with GTM Preview Mode
  • โœ… Easier to maintain and update
  • โœ… Can combine with GA4 and other tags seamlessly

๐Ÿ“‹ Prerequisites

Before starting, make sure you have:

  • โœ… A Google Tag Manager container set up (see GTM Setup Guide)
  • โœ… A Google Ads account with admin access
  • โœ… A Google Analytics 4 property (optional but recommended for enhanced conversions)

๐ŸŽฏ Step 1: Create Conversion Action in Google Ads

1.1 Navigate to Conversions

  1. Go to Google Ads
  2. Click Tools & Settings (wrench icon) โ†’ Conversions (under "Measurement")
  3. Click + New conversion action

1.2 Choose Conversion Source

  1. Select Website (for web conversions)
  2. Click Continue

1.3 Configure Conversion Details

  1. Category: Select the appropriate category (e.g., "Purchase", "Sign-up", "Lead")
  2. Conversion name: Give it a descriptive name (e.g., "Purchase - Website")
  3. Value:
    • Choose "Use different values for each conversion" (recommended for e-commerce)
    • Or "Use the same value for each conversion" (for lead generation)
  4. Count: Choose how to count conversions
    • "Every" - Count every conversion (recommended for purchases)
    • "One" - Count one per user (for sign-ups)
  5. Click-through conversion window: 30 days (default, adjust if needed)
  6. View-through conversion window: 1 day (default)
  7. Click Create and continue

1.4 Get Your Conversion Details

After creating the conversion, you'll see a screen with:

  • Conversion ID: AW-XXXXXXXXX (e.g., AW-11285604327)
  • Conversion Label: ABC123456 (e.g., AbC-D_efG1h)

๐Ÿ“ Write these down - you'll need them for GTM configuration.

Note: Google may show you a gtag.js code snippet. Don't use it directly - we'll configure it through GTM instead.

๐Ÿท๏ธ Step 2: Configure Google Ads Tag in GTM

2.1 Create Google Ads Configuration Tag

  1. In Google Tag Manager, go to Tags โ†’ New
  2. Click Tag Configuration
  3. Select Google Ads: Conversion Tracking

2.2 Enter Conversion Details

  1. Conversion ID: Enter your Conversion ID (e.g., AW-11285604327)
  2. Conversion Label: Enter your Conversion Label (e.g., AbC-D_efG1h)
  3. Conversion Value:
    • Use a variable (recommended for dynamic values)
    • Or enter a fixed value (for static conversions)
  4. Currency Code:
    • Use a variable (e.g., {{Currency Code}})
    • Or enter a fixed code (e.g., AED, USD, EUR)

2.3 Set Trigger

  1. Click Triggering
  2. Select when the conversion should fire:
    • Page View โ†’ Specific page (e.g., thank-you page)
    • Custom Event โ†’ When a specific event occurs (e.g., purchase)
    • Form Submission โ†’ When a form is submitted
    • Click โ†’ When a button is clicked

For thank-you page example:

  • Trigger Type: Page View
  • This trigger fires on: Some Page Views
  • Condition: Page URL โ†’ contains โ†’ /demos/ads/thankyou (or your thank-you page path)

2.4 Name and Save

  1. Tag Name: Google Ads - Purchase Conversion (or descriptive name)
  2. Click Save

๐Ÿ’ฐ Step 3: Set Up Dynamic Conversion Values (E-commerce)

If you're tracking purchases with dynamic values, you need to pass the value from your page to GTM.

3.1 Push Value to dataLayer (Recommended Method)

On your thank-you page (or conversion page), push the value to dataLayer:

// Example: On thank-you page after purchase
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'event': 'purchase',
  'conversion_value': 250.00,  // The actual purchase amount
  'currency': 'AED',            // Currency code
  'transaction_id': 'TXN-12345' // Optional: unique transaction ID
});

PHP Example:

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'event': 'purchase',
  'conversion_value': <?php echo json_encode($order_total); ?>,
  'currency': '<?php echo $currency_code; ?>',
  'transaction_id': '<?php echo $order_id; ?>'
});
</script>

3.2 Create GTM Variables

Go to Variables โ†’ New and create these Data Layer Variables:

Variable 1: Conversion Value

  • Variable Type: Data Layer Variable
  • Data Layer Variable Name: conversion_value
  • Data Layer Version: Version 2
  • Name: DLV - Conversion Value

Variable 2: Currency Code

  • Variable Type: Data Layer Variable
  • Data Layer Variable Name: currency
  • Data Layer Version: Version 2
  • Name: DLV - Currency Code

Variable 3: Transaction ID (Optional)

  • Variable Type: Data Layer Variable
  • Data Layer Variable Name: transaction_id
  • Data Layer Version: Version 2
  • Name: DLV - Transaction ID

3.3 Update Google Ads Tag to Use Variables

  1. Edit your Google Ads Conversion tag
  2. Conversion Value: Select {{DLV - Conversion Value}}
  3. Currency Code: Select {{DLV - Currency Code}}
  4. Transaction ID: (Optional) Select {{DLV - Transaction ID}}
  5. Trigger: Change to Custom Event โ†’ Event name: purchase
  6. Save the tag

๐Ÿ”— Step 4: Set Up Google Ads Conversion Linker (Important!)

The Conversion Linker tag ensures proper attribution across domains and devices.

4.1 Create Conversion Linker Tag

  1. In GTM, go to Tags โ†’ New
  2. Click Tag Configuration
  3. Select Google Ads: Conversion Linker
  4. Conversion ID: Enter your Conversion ID (same as your conversion tag)
  5. Trigger: All Pages (this should fire on every page)
  6. Tag Name: Google Ads - Conversion Linker
  7. Click Save

Why is this important?

The Conversion Linker helps Google Ads track users across different pages and devices, improving conversion attribution accuracy.

๐ŸŽฏ Step 5: Enhanced Conversions (Optional but Recommended)

Enhanced Conversions improve conversion tracking accuracy by sending hashed customer data.

5.1 Enable Enhanced Conversions in GTM

  1. Edit your Google Ads Conversion tag
  2. Scroll to Enhanced Conversions
  3. Toggle Enable Enhanced Conversions
  4. Choose data source:
    • Automatic (GTM will try to detect email/phone from forms)
    • Manual (you provide the data via dataLayer)

5.2 Manual Enhanced Conversions (More Control)

Push customer data to dataLayer (hashed for privacy):

window.dataLayer.push({
  'event': 'purchase',
  'conversion_value': 250.00,
  'currency': 'AED',
  'email': 'customer@example.com',  // Will be hashed automatically
  'phone_number': '+971501234567',  // Will be hashed automatically
  'address': {
    'first_name': 'John',
    'last_name': 'Doe',
    'street': '123 Main St',
    'city': 'Dubai',
    'region': 'Dubai',
    'postal_code': '12345',
    'country': 'AE'
  }
});

Then create Data Layer Variables for these fields and configure them in the Enhanced Conversions section.

๐Ÿ”„ Step 6: Link GA4 to Google Ads (Recommended)

Linking GA4 to Google Ads allows you to:

  • Import GA4 conversions into Google Ads
  • Use GA4 audiences for remarketing
  • Get better attribution data

6.1 Link in Google Ads

  1. In Google Ads, go to Tools & Settings โ†’ Linked accounts
  2. Find Google Analytics (GA4)
  3. Click Details โ†’ Link
  4. Select your GA4 property
  5. Enable Import site metrics and Import conversions
  6. Click Link

6.2 Import GA4 Conversions

  1. In Google Ads, go to Tools & Settings โ†’ Conversions
  2. Click + New conversion action
  3. Select Import
  4. Choose Google Analytics (GA4)
  5. Select the GA4 events you want to import (e.g., purchase, sign_up)
  6. Click Import and continue

โœ… Step 7: Test Your Setup

7.1 Use GTM Preview Mode

  1. In GTM, click Preview button
  2. Enter your website URL (e.g., http://gtm-learning.test/demos/ads/thankyou_gtm.php)
  3. Click Connect
  4. Navigate to your conversion page
  5. In the GTM Preview panel, verify:
    • โœ… Google Ads - Conversion Linker fired
    • โœ… Google Ads - Purchase Conversion fired
    • โœ… Check tag details to see conversion value and currency

7.2 Use Tag Assistant

  1. Install Tag Assistant Legacy Chrome extension
  2. Open your conversion page
  3. Click Tag Assistant icon โ†’ Enable โ†’ Record
  4. Refresh the page
  5. Verify:
    • โœ… Google Ads Conversion Tracking appears
    • โœ… Conversion ID matches your configuration
    • โœ… No errors shown

7.3 Check Google Ads

  1. Go to Google Ads โ†’ Tools & Settings โ†’ Conversions
  2. Click on your conversion action
  3. Check Recent conversions (may take a few hours to appear)
  4. Verify conversion value and count

๐Ÿ“Š Step 8: Publish Your Container

Once everything is tested and working:

  1. In GTM, click Submit (top right)
  2. Version Name: Added Google Ads Conversion Tracking
  3. Version Description: Configured Google Ads conversion tag with dynamic values and conversion linker
  4. Click Publish

๐ŸŽฏ Best Practices Summary

โœ… DO:

  • Use GTM for all Google Ads tags
  • Always include the Conversion Linker tag
  • Use dynamic conversion values
  • Enable Enhanced Conversions
  • Link GA4 to Google Ads
  • Test thoroughly in Preview Mode
  • Use descriptive tag names
  • Store click IDs and attach to conversions

โŒ DON'T:

  • Don't use direct gtag.js code
  • Don't forget the Conversion Linker tag
  • Don't use fixed conversion values for e-commerce
  • Don't publish without testing
  • Don't create duplicate conversion actions
  • Don't strip gclid/wbraid/gbraid from URLs

๐Ÿ” Troubleshooting

Conversion Not Firing

Check:

  • Is the trigger condition correct? (e.g., page URL matches)
  • Is the dataLayer event being pushed correctly?
  • Are the GTM variables returning values?
  • Is the Conversion Linker tag firing?
  • Check browser console for errors

Debug:

  • Use GTM Preview Mode to see tag firing status
  • Check dataLayer in browser console: console.log(window.dataLayer)
  • Verify trigger conditions match your page

Wrong Conversion Value

Check:

  • Is the dataLayer variable name correct? (case-sensitive)
  • Is the value being pushed to dataLayer before the tag fires?
  • Check variable preview in GTM Preview Mode

Conversions Not Appearing in Google Ads

Note: Conversions can take 24-48 hours to appear in Google Ads reports.

Check:

  • Verify tag is firing in GTM Preview Mode
  • Check Tag Assistant shows conversion tracking
  • Ensure Conversion ID and Label are correct
  • Verify Conversion Linker is firing on all pages

๐Ÿ“š Related Documentation

๐ŸŽ“ Learning Path

Recommended order:

  1. โœ… Set up GTM container (see GTM Setup Guide)
  2. โœ… Set up GA4 property (see GA4 Setup Guide)
  3. โœ… Create Google Ads conversion action (this guide, Step 1)
  4. โœ… Configure Google Ads tag in GTM (this guide, Step 2-4)
  5. โœ… Test and publish (this guide, Step 7-8)
  6. โœ… Link GA4 to Google Ads (this guide, Step 6)

๐Ÿ”— Official Resources

๐ŸŽ‰ Congratulations!

You've set up professional Google Ads conversion tracking through GTM. This is the industry-standard approach used by most companies.