Skip to main content

Cross-Domain Conversion Tracking For Landing Pages

If you drive traffic to your own website via Ads (Facebook, Google etc..) and point people to an eventrac landing page this guide will show you how you can track conversions

Aaron Bird avatar
Written by Aaron Bird
Updated over 3 weeks ago

What This Does

When someone clicks on your Google Ad (or Facebook Ad, etc.) and visits your main website, then clicks through to your event landing page on our platform, we need to make sure that booking conversions are properly attributed back to the original ad that brought them to you.

Without this setup:

  • User clicks your Google Ad → visits your website → books on the landing page

  • ❌ Google Ads doesn't see the conversion (you're wasting ad spend!)

With this setup:

  • User clicks your Google Ad → visits your website → books on the landing page

  • ✅ Google Ads records the conversion (you can see which ads are working!)

This works for:

  • ✅ Google Ads

  • ✅ Facebook & Instagram Ads

  • ✅ Microsoft Ads

  • ✅ TikTok Ads

  • ✅ LinkedIn Ads

Note: This is an advanced-level technical setup. If you would like someone from our team to help, feel free to contact us for support


Before You Start

Ensure you first follow this guide on setting up tracking for your landing page or tracking when using a widget on your own website


What You'll Need

  • Access to your Google Tag Manager account

  • 5 minutes to complete the setup

  • Your event landing page domain (e.g., the-big-events-company.eventrac.co.uk)


Step-by-Step Instructions

Step 1: Open Google Tag Manager

  1. Select your website's container

  2. Click "Tags" in the left sidebar

Step 2: Create a New Tag

  1. Click the "New" button (top right)

  2. Click on "Tag Configuration" box

  3. Scroll down and select "Custom HTML"

Step 3: Copy and Paste the Code

Copy the code below and paste it into the HTML box:

html

<script>
(function() {
// Step 1: Capture tracking IDs from the URL when visitors arrive
var urlParams = new URLSearchParams(window.location.search);
var clickIds = ['gclid', 'fbclid', 'msclkid', 'ttclid', 'li_fat_id'];

clickIds.forEach(function(param) {
var value = urlParams.get(param);
if (value) {
localStorage.setItem('_saved_' + param, value);
console.log('Captured ' + param + ': ' + value);
}
});

// Step 2: Add these tracking IDs to links going to your event landing pages
var savedParams = {};
clickIds.forEach(function(param) {
var saved = localStorage.getItem('_saved_' + param);
if (saved) {
savedParams[param] = saved;
}
});

// Only proceed if we have tracking parameters to add
if (Object.keys(savedParams).length > 0) {
// IMPORTANT: You may need to replace "eventrac.co.uk" if you use a custom domain for your eventrac landing page
document.querySelectorAll('a[href*="eventrac.co.uk"]').forEach(function(link) {
try {
var url = new URL(link.href);

// Add each tracking parameter to the link if not already present
Object.keys(savedParams).forEach(function(param) {
if (!url.searchParams.has(param)) {
url.searchParams.set(param, savedParams[param]);
}
});

link.href = url.toString();
} catch (e) {
// Ignore any malformed URLs
}
});

console.log('Landing page links decorated with tracking parameters');
}
})();
</script>

Note: If using a custom domain for your landing page, you will need to repalce the eventrac.co.uk URL with yours above

Step 4: Set the Trigger

  1. Click on "Triggering" box (below the HTML code)

  2. Click the "+" icon in the top right

  3. Click on the trigger box that appears

  4. Select "All Pages"

  5. Click "Save" (top right)

Step 5: Name and Save Your Tag

  1. Click on the tag name at the top (it says "Untitled Tag")

  2. Rename it to: "Cross-Domain Ad Tracking"

  3. Click "Save" (top right)

Step 6: Publish Your Changes

  1. Click "Submit" (top right, blue button)

  2. Add a description like: "Added cross-domain ad tracking for event bookings"

  3. Click "Publish"


How to Test That It's Working

Quick Test (2 minutes):

  1. Add test parameter to your website URL

    • Visit your website and add ?gclid=test123 to the end

    • Example: https://yourwebsite.com?gclid=test123

  2. Check your browser console

    • Right-click anywhere → InspectConsole tab

    • You should see: Captured gclid: test123

  3. Find a link to your event landing page

    • Right-click on the link → Inspect

    • Look at the href - it should now include ?gclid=test123

    • Example: https://yourcustomer.eventrac.co.uk?gclid=test123

  4. Success!

    • If you see the tracking parameter in the link, it's working correctly

Real-World Test (After Running Ads):

  1. Click on one of your actual Google Ads

  2. Navigate through your website

  3. Click a link to your event landing page

  4. Complete a test booking

  5. Wait 24-48 hours

  6. Check Google Ads → Conversions

  7. You should see the conversion recorded ✅


Troubleshooting

I don't see any tracking parameters in my links


Check these things:

  1. Is the tag published?

    • GTM changes only work after clicking "Submit" → "Publish"

  2. Are you testing with a tracking parameter?

    • Add ?gclid=test123 to your URL before checking links

  3. Clear your browser cache

    • Sometimes old code gets cached

    • Try in an Incognito/Private window

  4. Do you have links to the landing pages on the page you're testing?

    • The code only decorates links that exist on the page

    • Navigate to a page that has a "Book Now" or event registration link

My links look weird with lots of parameters


This is normal! A link might look like:

https://yourcustomer.eventrac.co.uk?gclid=abc123&fbclid=xyz789

These parameters are invisible to your customers and necessary for accurate tracking.

"I'm still not seeing conversions in Google Ads"

Check these:

  1. Wait 24-48 hours - Conversions take time to appear in Google Ads

  2. Verify your GA4/Google Ads conversion setup - The conversion action must be configured in Google Ads

  3. Check if you have actual ad traffic - No clicks = no conversions to track

  4. Make sure customers are actually completing bookings - Test the full booking flow yourself

  5. Verify the purchase event is firing - Check in GA4 → Realtime → Events while completing a test booking

I'm still not seeing conversions in Google Ads

Check these:

  1. Wait 24-48 hours - Conversions take time to appear in Google Ads

  2. Verify your GA4/Google Ads conversion setup - The conversion action must be configured in Google Ads

  3. Check if you have actual ad traffic - No clicks = no conversions to track

  4. Make sure customers are actually completing bookings - Test the full booking flow yourself

  5. Verify the purchase event is firing - Check in GA4 → Realtime → Events while completing a test booking


What Happens Behind the Scenes

When someone clicks your ad, platforms like Google add a special tracking code to the URL (called gclid, fbclid, etc.).

The problem: When they navigate from your website to your event landing page, this tracking code gets lost because they're crossing to a different domain.

The solution: This code automatically:

  1. Saves the tracking code when visitors arrive on your site

  2. Adds it back to all links pointing to your event landing pages

  3. Preserves the connection between the ad click and the final booking

This means platforms like Google Ads can see the complete journey and credit the conversion to the right ad!


Support

If you run into any issues or have questions:

  • 💬 Live Chat: Contact

  • 🗓️ Book A Meeting: Book a meeting with one of our experts


Technical Details (Optional Reading)

What tracking parameters does this capture?

  • gclid - Google Ads clicks

  • fbclid - Facebook & Instagram ads

  • msclkid - Microsoft Ads (Bing)

  • ttclid - TikTok ads

  • li_fat_id - LinkedIn ads

Where is data stored?

  • In your visitor's browser (localStorage)

  • Data expires when they close their browser

  • No personal information is collected

  • Fully GDPR compliant (stores only anonymous ad click IDs)

Does this slow down my website?

  • No - the code is lightweight and runs asynchronously

  • Typical execution time: <5 milliseconds

  • No impact on page load speed or user experience

Did this answer your question?