Google Ads Server-Side Tracking
Configure robust conversion tracking for Google Ads using Hardal’s server-side integration
Overview
Server-side tracking for Google Ads conversion tracking offers significant advantages in accuracy, reliability, and privacy compliance. This guide explains how to implement Google Ads conversion tracking using Hardal’s server-side infrastructure.
This implementation leverages Hardal’s integration with server-side Google Tag Manager (sGTM) to process conversion events server-side before sending them to Google Ads. Make sure you have already implemented Server-Side Google Tag Manager with Hardal first!
Prerequisites
Before implementing server-side tracking for Google Ads, ensure you have:
- Google Tag Manager account with administrative access
- Google Ads account with administrative access
- Google Analytics 4 property
- Server and web containers already set up in GTM
- At least one Google Ads conversion action created
To maximize data ownership and tracking reliability, configure a custom domain for your Hardal implementation before setting up Google Ads server-side tracking.
Step 1: Client-Side Setup
First, configure your web container to capture conversion events and send them to your server container.
Set up Conversion Linker Tag
The Conversion Linker tag preserves ad click information for conversions:
- In your GTM web container, go to Tags → New
- Select Conversion Linker as the tag type
- Configure it to fire on All Pages
- Name it “Conversion Linker” and save
This tag captures Google click identifiers (gclid) from URLs and stores them in first-party cookies.
Configure Google Tag
Google Tag is now used instead of the GA4 Configuration Tag for managing GA4 implementations:
- Go to Tags → New
- Select Google Tag (this replaces the GA4 Configuration tag)
- Enter your GA4 Measurement ID (G-XXXXXXXX) in the Tag ID field
- Under Configuration Settings, click “Add” to create configuration parameters:
- Name:
server_container_url
- Value: Your Hardal sGTM Tagging URL
- Name:
- Add another parameter:
- Name:
first_party_collection
- Value:
true
- Name:
- Configure to fire on All Pages
- Name it “GA4 Google Tag” and save
Google Tag has replaced the GA4 Configuration tag as Google’s recommended implementation method. It offers the same functionality with improved flexibility.
Create Conversion Event Tags
For each conversion action you want to track:
- Go to Tags → New
- Select Google Analytics: GA4 Event
- Choose your GA4 Configuration tag
- Enter the event name (e.g., “purchase”, “form_submit”, “sign_up”)
- Add relevant parameters:
- For e-commerce:
value
,currency
,transaction_id
- For leads: form fields or other relevant data
- For e-commerce:
- Set up appropriate triggers for the conversion action
- Name it descriptively (e.g., “GA4 - Purchase Event”) and save
Step 2: Server-Side Setup
Next, configure your server container to process the incoming events and send them to Google Ads.
Configure GA4 Client
Set up the GA4 client to receive events from your website:
- In your server container, go to Clients
- If not already present, click New and select Google Analytics: GA4
- Configure with the following settings:
- Default GA4 paths: Enabled
- Default gtag.js paths: Enabled (add your GA4 Measurement ID)
- Automatically serve dependent scripts: Enabled
- Compress HTTP response: Enabled
- Cookies and Client Identification: Server Managed
- Name it “GA4 Client” and save
Add Server-Side Conversion Linker
- Go to Tags → New
- Select Conversion Linker as the tag type
- Configure to fire on All Pages
- Name it “Server Conversion Linker” and save
Create Google Ads Conversion Tag
For each conversion action:
- Go to Tags → New
- Select Google Ads Conversion Tracking
- Enter your Conversion ID and Conversion Label from Google Ads
- For the trigger, create a Custom Event trigger that:
- Fires on event that matches your GA4 Event name
- Uses “Client Name equals GA4” condition
- Name it descriptively (e.g., “Google Ads - Purchase Conversion”) and save
Purchase Configuration
Conversion ID: AW-XXXXXXXXXX
Conversion Label: XXXXXXXXXXXXXXXXXX
Event Name: purchase
The tag automatically reads e-commerce parameters:
- Value from
eventModel.value
- Currency from
eventModel.currency
- Transaction ID from
eventModel.transaction_id
Purchase Configuration
Conversion ID: AW-XXXXXXXXXX
Conversion Label: XXXXXXXXXXXXXXXXXX
Event Name: purchase
The tag automatically reads e-commerce parameters:
- Value from
eventModel.value
- Currency from
eventModel.currency
- Transaction ID from
eventModel.transaction_id
Lead Form Configuration
Conversion ID: AW-XXXXXXXXXX
Conversion Label: XXXXXXXXXXXXXXXXXX
Event Name: generate_lead
Add custom parameters as needed for lead quality:
- Value:
{{Lead Score}}
(custom variable) - Currency:
USD
(static value)
Signup Configuration
Conversion ID: AW-XXXXXXXXXX
Conversion Label: XXXXXXXXXXXXXXXXXX
Event Name: sign_up
Consider adding:
- Value:
{{Signup LTV}}
(estimated lifetime value) - Currency:
USD
(static value)
Enhanced Conversions
Enhanced Conversions improve match rates by using hashed customer data like email addresses or phone numbers.
Create User Data Variable
- In your web container, go to Variables → New
- Select User-Provided Data variable type
- Choose a collection method:
- Automatic: Detect form fields automatically
- Manual: Specify CSS selectors for form fields
- Code: Use custom JavaScript
- Name it “Enhanced Conversion Data” and save
Add User Data to GA4 Configuration
- Edit your GA4 Configuration tag
- Under Fields to Set, add:
- Name:
user_data
- Value:
{{Enhanced Conversion Data}}
(your variable)
- Name:
- Save the tag
Enable in Server-Side Tag
- Edit your Google Ads Conversion Tracking tag
- Enable Enhanced Conversions
- Save the tag
Enhanced Conversions improves match quality but requires careful handling of PII data. All PII is automatically hashed before being sent to Google.
Testing and Validation
Proper testing ensures your setup is working correctly:
Test in Preview Mode
- In your web container, click Preview
- In your server container, click Preview
- Navigate to your website and perform test conversions
- In the web preview, verify:
- GA4 event is firing with expected parameters
- Event data is being sent to your server URL
- In the server preview, verify:
- GA4 client is receiving the event
- Google Ads conversion tag is firing
- Conversion data looks correct
Use Google Ads Conversion Tracking Tools
- In Google Ads, go to Tools → Conversions
- Click on your conversion action
- Check the Status column to ensure it’s “Recording conversions”
- Perform test conversions and allow 24-48 hours
- Verify conversions appear in your Google Ads reports
Troubleshooting Common Issues
Was this page helpful?