Installation Overview
Google Ads provides multiple methods for implementing conversion tracking and remarketing tags on your website. Choose the installation method that best fits your technical infrastructure and team capabilities.
Delivery Options
Google Tag (gtag.js) - Direct Implementation
Best for:
- Simple websites with basic tracking needs
- Teams comfortable editing website code directly
- Sites without existing tag management solution
Limitations:
- Requires code changes for each tracking update
- Harder to test and debug changes
- Multiple Google products require separate implementations
Google Tag Manager (GTM) - Centralized Management
Best for:
- Sites with multiple marketing tags
- Teams needing non-technical tag deployment
- Complex tracking requirements
Benefits:
- Deploy tags without code changes
- Preview and test before publishing
- Centralized tag management
- Built-in debugging tools
GA4 Import - Leverage Existing Conversions
Best for:
- Sites already using GA4
- Teams wanting unified analytics
- Avoiding duplicate tracking implementations
Requirements:
- Active GA4 property
- GA4 and Google Ads accounts linked
- Events marked as conversions in GA4
Installation Method 1: Google Tag (gtag.js)
Step 1: Retrieve Conversion Tag
- In Google Ads: Tools → Conversions → New conversion action
- Select conversion source (Website, App, Phone calls, Import)
- For website: Choose manual code installation
- Copy the Global Site Tag code
- Copy the Event Snippet code
Step 2: Install Global Site Tag
Add the Global Site Tag to the <head> section of every page:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-CONVERSION_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-CONVERSION_ID');
</script>
Important:
- Replace
AW-CONVERSION_IDwith your actual Conversion ID (e.g.,AW-123456789) - Install on all pages, not just conversion pages
- Place as high in
<head>as possible for early loading
Step 3: Install Event Snippet
Add the Event Snippet to conversion pages only (e.g., thank you page):
<!-- Event snippet for Purchase conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
'value': 1.0,
'currency': 'USD',
'transaction_id': ''
});
</script>
Configuration options:
'send_to': Your Conversion ID and Label (e.g.,'AW-123456789/AbC1DeFgHiJkLmNoPqRs')'value': Conversion value (use dynamic value for e-commerce)'currency': Currency code (USD, EUR, GBP, etc.)'transaction_id': Unique order ID (prevents duplicate conversions)
Step 4: Dynamic Conversion Values
For e-commerce, use dynamic values:
<script>
gtag('event', 'conversion', {
'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
'value': <?php echo $order_total; ?>, // Dynamic from server
'currency': 'USD',
'transaction_id': '<?php echo $order_id; ?>'
});
</script>
JavaScript example:
// Capture order total from page
const orderTotal = document.getElementById('orderTotal').textContent;
const orderId = document.getElementById('orderId').textContent;
gtag('event', 'conversion', {
'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
'value': parseFloat(orderTotal),
'currency': 'USD',
'transaction_id': orderId
});
Installation Method 2: Google Tag Manager
Step 1: Install GTM Container
Add GTM container code to your website (one-time setup):
In <head>:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
After opening <body> tag:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Replace GTM-XXXXXX with your GTM Container ID.
Step 2: Create Google Ads Conversion Tracking Tag
- Tags → New → Tag Configuration
- Select tag type: Google Ads Conversion Tracking
- Configure tag settings:
- Conversion ID:
AW-123456789(from Google Ads) - Conversion Label:
AbC1DeFgHiJkLmNoPqRs(from Google Ads) - Conversion Value: Use variable or static value
- Currency Code: USD (or your currency)
- Transaction ID: Use variable for deduplication
- Conversion ID:
Step 3: Configure Trigger
Set when the conversion tag should fire:
Page View Trigger (Thank You Page):
Trigger Type: Page View
Trigger Fires On: Some Page Views
Page Path contains /thank-you
Form Submission Trigger:
Trigger Type: Form Submission
Trigger Fires On: All Forms
OR
Trigger Fires On: Some Forms
Form ID equals contact-form
Custom Event Trigger:
Trigger Type: Custom Event
Event Name: purchase
Step 4: Configure Data Layer (for dynamic values)
Push conversion data to Data Layer:
// On conversion page
dataLayer.push({
'event': 'purchase',
'transactionId': 'ORDER-12345',
'transactionTotal': 99.99,
'transactionCurrency': 'USD'
});
Create GTM Variables:
- Variables → New → Data Layer Variable
- Variable names:
transactionId→ Data Layer Variable:transactionIdtransactionTotal→ Data Layer Variable:transactionTotaltransactionCurrency→ Data Layer Variable:transactionCurrency
Use variables in tag:
- Conversion Value:
{{transactionTotal}} - Currency Code:
{{transactionCurrency}} - Transaction ID:
{{transactionId}}
Step 5: Test and Publish
- Click Preview to enter Preview mode
- Visit your website in new tab
- Verify tag fires on conversion page in GTM debugger
- Check that conversion appears in Google Ads (Tools → Conversions)
- If working correctly, click Submit to publish
Installation Method 3: GA4 Import
Step 1: Link GA4 and Google Ads
- In GA4: Admin → Google Ads Links
- Click Link → Select Google Ads account
- Configure link settings:
- Enable Personalized advertising
- Import site metrics
- Include Google signals
Step 2: Mark GA4 Events as Conversions
- In GA4: Admin → Events
- Find relevant event (e.g.,
purchase,sign_up) - Toggle Mark as conversion
Step 3: Import to Google Ads
- In Google Ads: Tools → Conversions → New conversion action
- Select Import → Google Analytics 4
- Choose events to import
- Click Import and Continue
Imported conversions appear as:
- Source: Google Analytics 4
- Action optimization: Available for bid strategies
Enhanced Conversions Setup
What are Enhanced Conversions?
Enhanced conversions improve accuracy by sending hashed first-party customer data (email, phone, address) to match conversions with Google accounts.
Implementation via GTM
- Enable Enhanced Conversions in Google Ads conversion action settings
- In GTM, edit Google Ads Conversion Tracking tag
- Enable Include user-provided data from your website
- Select automatic or manual data collection
Automatic Collection:
GTM automatically detects email, phone, and address fields on page.
Manual Configuration:
Map data layer variables to user data:
// Push user data to Data Layer
dataLayer.push({
'event': 'purchase',
'email': 'user@example.com',
'phone_number': '+12025551234',
'address': {
'first_name': 'John',
'last_name': 'Doe',
'street': '123 Main St',
'city': 'Washington',
'region': 'DC',
'postal_code': '20001',
'country': 'US'
}
});
In GTM tag settings, map variables:
- Email:
{{userEmail}} - Phone:
{{userPhone}} - Address fields: Map each field from Data Layer
Data is hashed by GTM before sending to Google.
Implementation via gtag.js
gtag('event', 'conversion', {
'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
'value': 99.99,
'currency': 'USD',
'email': 'user@example.com',
'phone_number': '+12025551234',
'address': {
'first_name': 'John',
'last_name': 'Doe',
'street': '123 Main St',
'city': 'Washington',
'postal_code': '20001',
'country': 'US'
}
});
Remarketing Tag Installation
GTM Implementation
- Tags → New → Google Ads Remarketing
- Configure:
- Conversion ID:
AW-123456789
- Conversion ID:
- Trigger: All Pages
- (Optional) Set custom parameters for dynamic remarketing
gtag.js Implementation
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-CONVERSION_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-CONVERSION_ID');
</script>
Remarketing is automatically enabled with the Global Site Tag.
Dynamic Remarketing Parameters
For e-commerce dynamic remarketing:
gtag('event', 'page_view', {
'send_to': 'AW-CONVERSION_ID',
'ecomm_prodid': ['PRODUCT_ID_1', 'PRODUCT_ID_2'],
'ecomm_pagetype': 'product', // home, category, product, cart, purchase
'ecomm_totalvalue': 99.99
});
Validation and Testing
Google Tag Assistant
- Install Google Tag Assistant Chrome extension
- Visit your website
- Click extension icon
- Verify:
- Google Ads tag present
- Tag fires on correct pages
- No errors or warnings
Preview Mode (GTM)
- In GTM, click Preview
- Enter your website URL
- GTM debugger opens in new tab
- Navigate to conversion page
- Verify tag fires in debugger Summary panel
Google Ads Conversion Tracking
- In Google Ads: Tools → Conversions
- Find your conversion action
- Check Status column shows "Recording conversions"
- Perform test conversion on your site
- Conversion appears in Google Ads within a few hours
Browser Developer Console
Check for errors:
- Open browser DevTools (F12)
- Go to Console tab
- Look for gtag or GTM errors
- Verify Data Layer pushes (for GTM)
Check Data Layer:
// In browser console
console.log(dataLayer);
Test Conversions
Important: Test conversions count toward your totals. To avoid:
- Use Google Ads test conversion feature (limited availability)
- Filter internal traffic by IP address in Google Ads
- Test on staging environment before production
Troubleshooting
Tag not firing:
- Verify tag installed on correct pages
- Check for JavaScript errors blocking execution
- Confirm GTM container is published
- Verify correct Conversion ID and Label
Conversions not recording:
- Allow up to 24 hours for first conversions to appear
- Check conversion action is not paused
- Verify GCLID parameter present in URL after ad click
- Confirm tag fires after page load completes
Duplicate conversions:
- Use transaction_id to deduplicate
- Ensure tag doesn't fire multiple times
- Check for duplicate tag installations
Enhanced conversions not working:
- Verify email/phone format is correct
- Check data is being hashed before sending
- Confirm enhanced conversions enabled in conversion action settings
Best Practices
- Use GTM for easier management and testing
- Install Global Site Tag on all pages, not just conversion pages
- Use transaction IDs to prevent duplicate conversion counting
- Enable auto-tagging in Google Ads settings for accurate attribution
- Test thoroughly before going live with conversion tracking
- Document your implementation including Conversion IDs and Labels
- Use Data Layer for dynamic values instead of hardcoding
- Enable Enhanced Conversions for improved accuracy
- Set up conversion value tracking for e-commerce sites
- Filter internal traffic to avoid counting test conversions