Overview
Cross-domain tracking allows Floodlight to maintain user session continuity across multiple domains or subdomains. This is critical for accurate conversion attribution when users navigate between your marketing site, e-commerce platform, and checkout pages on different domains.
Use Cases
- Marketing site (marketing.example.com) → E-commerce site (shop.example.com)
- Main website (example.com) → Checkout on third-party platform (checkout.partner.com)
- Multiple brand sites under same advertiser
- Subdomain transitions (www.example.com → app.example.com)
- International sites with different TLDs (example.com → example.co.uk)
How Floodlight Cross-Domain Tracking Works
Floodlight uses first-party cookies to track users. When a user crosses domains, the session data needs to be passed to maintain attribution continuity.
Default Behavior (Single Domain)
- Floodlight sets cookies on the current domain
- Cookies persist across pages within same domain
- Attribution works automatically
Cross-Domain Scenario
- User clicks DV360 ad → lands on marketing.example.com
- User navigates to shop.example.com (different domain)
- Without cross-domain tracking: session breaks, conversion not attributed
- With cross-domain tracking: session persists, conversion properly attributed
Implementation Methods
Method 1: Auto Linker (GTM - Recommended)
Google Tag Manager's auto-link functionality automatically appends Floodlight parameters to cross-domain links.
GTM Configuration
Create Floodlight Configuration Variable:
- Variable Type: Google Floodlight Configuration
- Advertiser ID: DC-XXXXXXXX
- Auto-link domains: shop.example.com, checkout.example.com
Configure Auto-link Domains:
// In GTM, Floodlight Configuration tag settings
{
'allow_ad_personalization_signals': true,
'linker': {
'domains': ['marketing.example.com', 'shop.example.com', 'checkout.example.com']
}
}
- Set Cookie Domain:
- For subdomains: Set to '.example.com' (note the leading dot)
- For different domains: Configure linker
GTM Tag Example
<script>
gtag('config', 'DC-XXXXXXXX', {
'linker': {
'domains': ['marketing.example.com', 'shop.example.com'],
'accept_incoming': true
},
'cookie_domain': 'auto',
'cookie_flags': 'SameSite=None;Secure'
});
</script>
Method 2: Manual Parameter Passing
For direct implementations without GTM, manually append Floodlight parameters to cross-domain links.
Implementation
// Add to all cross-domain links
function addFloodlightParams(url) {
// Get Floodlight cookie value
var flCookie = getCookie('_gcl_dc');
if (flCookie) {
var separator = url.indexOf('?') !== -1 ? '&' : '?';
return url + separator + '_gcl_dc=' + encodeURIComponent(flCookie);
}
return url;
}
// Helper function to get cookie
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
// Apply to links
document.querySelectorAll('a[href*="shop.example.com"]').forEach(function(link) {
link.href = addFloodlightParams(link.href);
});
Method 3: Server-Side Implementation
For server-side tagging or when JavaScript isn't available:
// Server-side: Extract and forward Floodlight parameters
const floodlightParam = request.query._gcl_dc || request.cookies._gcl_dc;
if (floodlightParam) {
// Set cookie on new domain
response.cookie('_gcl_dc', floodlightParam, {
domain: '.example.com',
maxAge: 90 * 24 * 60 * 60 * 1000, // 90 days
secure: true,
sameSite: 'none'
});
}
Configuration Steps
Step 1: Identify All Domains
List all domains and subdomains involved in user journey:
- Marketing sites
- Product/service sites
- E-commerce platforms
- Checkout systems
- Mobile app web views (if applicable)
Step 2: Configure Floodlight Settings
In Campaign Manager 360:
- Navigate to Advertiser → Floodlight → Configuration
- Review Cookie Settings
- Ensure Counting Method supports cross-domain (typically "Standard")
Step 3: Implement Linker
Choose implementation method (GTM recommended):
GTM Auto-linker:
- Add all domains to linker configuration
- Enable "Accept incoming" parameter
- Test parameter passing
Manual linking:
- Update all cross-domain anchor tags
- Implement JavaScript to append parameters
- Test cookie persistence
Step 4: Test & Validate
- Navigate from Domain A to Domain B
- Check URL for _gcl_dc parameter
- Verify cookie persists on Domain B
- Trigger conversion and confirm attribution
Testing Cross-Domain Tracking
Browser DevTools Method
- Open Chrome DevTools → Application → Cookies
- Navigate to first domain (marketing.example.com)
- Note _gcl_dc cookie value
- Click cross-domain link
- Check new domain (shop.example.com) for same _gcl_dc value
- Verify cookie matches
GTM Preview Mode
- Enable GTM Preview mode
- Navigate through cross-domain journey
- Check Tags tab for Floodlight Configuration
- Verify linker parameters in Variables
- Confirm tags fire on both domains
URL Parameter Verification
Cross-domain links should include _gcl_dc parameter:
https://shop.example.com/products?_gcl_dc=GCL.1234567890.CjwKCAiA...
Campaign Manager Test Conversions
- Navigate from first domain with DV360 ad click
- Complete cross-domain journey
- Trigger conversion
- Check Campaign Manager Test Conversions tool
- Verify attribution to original click
Common Issues & Troubleshooting
Issue: Parameters Not Appending to Links
Causes:
- Linker domains not configured in GTM
- Links added dynamically after page load
- Form submissions (POST) losing parameters
Solutions:
- Add all domains to linker configuration
- Re-run linker script after dynamic content loads
- Use hidden form fields to preserve parameters
Issue: Cookie Not Persisting
Causes:
- Cookie domain mismatch
- SameSite restrictions
- Third-party cookie blocking
Solutions:
- Set cookie_domain to common parent (.example.com)
- Use SameSite=None;Secure for cross-site cookies
- Implement server-side cookie handling
Issue: Attribution Breaking
Causes:
- Parameter lost during redirect chains
- Cookie expiration
- Different Floodlight configurations on different domains
Solutions:
- Preserve parameters through all redirects
- Verify cookie expiration (default 90 days)
- Use same Floodlight configuration across all domains
Special Scenarios
Subdomain to Subdomain
For subdomains under same parent domain:
gtag('config', 'DC-XXXXXXXX', {
'cookie_domain': '.example.com' // Works for *.example.com
});
Third-Party Checkout Platform
When checkout is on partner domain:
// On your domain: append parameters to checkout link
<a href="https://checkout.partner.com/cart?_gcl_dc={{_gcl_dc}}"
id="checkout-link">Proceed to Checkout</a>
// Partner implements: accept and set cookie
// Partner must deploy your Floodlight global tag
Mobile App Web Views
For attribution between mobile web and app web views:
// Pass parameter to web view
webView.loadUrl("https://example.com/checkout?_gcl_dc=" + floodlightValue);
// Implement universal links for seamless transition
Best Practices
- Use GTM auto-linker for simplest implementation
- Test cross-domain flow in all browsers (especially Safari with ITP)
- Set cookie_domain to broadest applicable domain (.example.com)
- Use SameSite=None;Secure for cross-site cookies
- Monitor attribution reports for unusual drop-offs between domains
- Document all domains in linker configuration
- Test after any domain changes or redirects
- Implement server-side fallback for cookie blocking scenarios
- Keep Floodlight configuration consistent across all domains
- Review and update domain list quarterly
Privacy & Compliance
- Disclose cross-domain tracking in privacy policy
- Implement consent management for EU users
- Respect user opt-out preferences across all domains
- Use first-party cookies when possible
- Consider server-side implementation for better privacy control
- Document data flows for GDPR compliance