๐ฐ 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
- Go to Google Ads
- Click Tools & Settings (wrench icon) โ Conversions (under "Measurement")
- Click + New conversion action
1.2 Choose Conversion Source
- Select Website (for web conversions)
- Click Continue
1.3 Configure Conversion Details
- Category: Select the appropriate category (e.g., "Purchase", "Sign-up", "Lead")
- Conversion name: Give it a descriptive name (e.g., "Purchase - Website")
- Value:
- Choose "Use different values for each conversion" (recommended for e-commerce)
- Or "Use the same value for each conversion" (for lead generation)
- Count: Choose how to count conversions
- "Every" - Count every conversion (recommended for purchases)
- "One" - Count one per user (for sign-ups)
- Click-through conversion window: 30 days (default, adjust if needed)
- View-through conversion window: 1 day (default)
- 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
- In Google Tag Manager, go to Tags โ New
- Click Tag Configuration
- Select Google Ads: Conversion Tracking
2.2 Enter Conversion Details
- Conversion ID: Enter your Conversion ID (e.g.,
AW-11285604327) - Conversion Label: Enter your Conversion Label (e.g.,
AbC-D_efG1h) - Conversion Value:
- Use a variable (recommended for dynamic values)
- Or enter a fixed value (for static conversions)
- Currency Code:
- Use a variable (e.g.,
{{Currency Code}}) - Or enter a fixed code (e.g.,
AED,USD,EUR)
- Use a variable (e.g.,
2.3 Set Trigger
- Click Triggering
- 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
- Tag Name:
Google Ads - Purchase Conversion(or descriptive name) - 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
- Edit your Google Ads Conversion tag
- Conversion Value: Select
{{DLV - Conversion Value}} - Currency Code: Select
{{DLV - Currency Code}} - Transaction ID: (Optional) Select
{{DLV - Transaction ID}} - Trigger: Change to Custom Event โ Event name:
purchase - 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
- In GTM, go to Tags โ New
- Click Tag Configuration
- Select Google Ads: Conversion Linker
- Conversion ID: Enter your Conversion ID (same as your conversion tag)
- Trigger: All Pages (this should fire on every page)
- Tag Name:
Google Ads - Conversion Linker - 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
- Edit your Google Ads Conversion tag
- Scroll to Enhanced Conversions
- Toggle Enable Enhanced Conversions
- 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
- In Google Ads, go to Tools & Settings โ Linked accounts
- Find Google Analytics (GA4)
- Click Details โ Link
- Select your GA4 property
- Enable Import site metrics and Import conversions
- Click Link
6.2 Import GA4 Conversions
- In Google Ads, go to Tools & Settings โ Conversions
- Click + New conversion action
- Select Import
- Choose Google Analytics (GA4)
- Select the GA4 events you want to import (e.g.,
purchase,sign_up) - Click Import and continue
โ Step 7: Test Your Setup
7.1 Use GTM Preview Mode
- In GTM, click Preview button
- Enter your website URL (e.g.,
http://gtm-learning.test/demos/ads/thankyou_gtm.php) - Click Connect
- Navigate to your conversion page
- 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
- Install Tag Assistant Legacy Chrome extension
- Open your conversion page
- Click Tag Assistant icon โ Enable โ Record
- Refresh the page
- Verify:
- โ Google Ads Conversion Tracking appears
- โ Conversion ID matches your configuration
- โ No errors shown
7.3 Check Google Ads
- Go to Google Ads โ Tools & Settings โ Conversions
- Click on your conversion action
- Check Recent conversions (may take a few hours to appear)
- Verify conversion value and count
๐ Step 8: Publish Your Container
Once everything is tested and working:
- In GTM, click Submit (top right)
- Version Name:
Added Google Ads Conversion Tracking - Version Description:
Configured Google Ads conversion tag with dynamic values and conversion linker - 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
- GTM Container & GA4 Tags - How to set up GTM and GA4
- Google Ads Click IDs - Understanding click IDs
- GA4 Property Setup - How to create a GA4 property
๐ Learning Path
Recommended order:
- โ Set up GTM container (see GTM Setup Guide)
- โ Set up GA4 property (see GA4 Setup Guide)
- โ Create Google Ads conversion action (this guide, Step 1)
- โ Configure Google Ads tag in GTM (this guide, Step 2-4)
- โ Test and publish (this guide, Step 7-8)
- โ Link GA4 to Google Ads (this guide, Step 6)
๐ Official Resources
- Google Ads Conversion Tracking Help
- GTM Google Ads Conversion Tag
- Enhanced Conversions Guide
- GA4 and Google Ads Integration
๐ Congratulations!
You've set up professional Google Ads conversion tracking through GTM. This is the industry-standard approach used by most companies.