How to Set Up Triple Whale for Google Ads
I see Triple Whale setups that are completely broken about 60% of the time — usually because the pixel firing is inconsistent or the Google Ads integration is pulling the wrong conversion data. The biggest issue is that most people think Triple Whale’s “one-click” Google Ads integration actually sets up proper attribution tracking, when it really just pulls basic campaign data.
What You’ll Have Working By The End
- Triple Whale pixel firing on all key pages with proper UTM parameter capture
- Google Ads conversions flowing into Triple Whale’s attribution model
- URL parameter passthrough configured for gclid and UTM tracking
- Cross-platform attribution showing Google Ads influence across the customer journey
- Data validation system to catch tracking breaks before they cost you money
Prerequisites
- Triple Whale account with admin access
- Google Ads account with admin or standard access
- Website with ability to add JavaScript to header
- Google Analytics 4 already configured (Triple Whale pulls GA4 data for validation)
- Shopify store (if e-commerce) or custom checkout tracking capability
Step 1: Install the Triple Whale Pixel Correctly
Most people just drop the pixel in GTM and call it done. That misses half the attribution data.
Go to Triple Whale → Settings → Pixel & Integrations. You’ll see your pixel code that looks like this:
<script>
!function(t,r,i,p,l,e,w,h,a,l,e){
t.TripleWhale=t.TripleWhale||[],
t.TripleWhale.SNIPPET_VERSION="1.0.1",
r=r.createElement("script"),
r.async=!0,
r.src="https://get.triplewhale.com/tw.js",
r.charset="UTF-8",
i=r.readyState,
p=function(){
var t;
i&&"loaded"!==i&&"complete"!==i||((t=t||document.getElementsByTagName("script")[0]).parentNode.insertBefore(r,t))
},
i?r.onreadystatechange=p:r.onload=p,
p()
}(window,document),
TripleWhale.load('YOUR_PIXEL_ID');
</script>
Critical: Add this enhanced version that captures URL parameters:
<script>
// Capture URL parameters before pixel loads
function getUrlParams() {
const params = new URLSearchParams(window.location.search);
const utmParams = {};
const gclid = params.get('gclid');
// Capture all UTM parameters
params.forEach((value, key) => {
if (key.startsWith('utm_')) {
utmParams[key] = value;
}
});
return { gclid, ...utmParams };
}
const urlParams = getUrlParams();
// Triple Whale pixel code here
!function(t,r,i,p,l,e,w,h,a,l,e){
// ... (pixel code from above)
}(window,document),
TripleWhale.load('YOUR_PIXEL_ID', {
user_properties: urlParams
});
</script>
Place this in your website header, before any other tracking scripts. If you’re using GTM, create a Custom HTML tag that fires on All Pages with a priority of 1.
For Shopify users: Go to Online Store → Themes → Actions → Edit Code → theme.liquid and paste right after the opening <head> tag.
Step 2: Configure Google Ads Integration
The default integration only pulls campaign data — it doesn’t set up proper conversion tracking.
In Triple Whale:
- Go to Settings → Integrations
- Click “Connect” next to Google Ads
- Authenticate your Google account
- Important: Select the specific Google Ads account, not just the manager account
After connection, configure conversion mapping:
- Navigate to Attribution → Conversion Settings
- Map your website events to Google Ads conversion actions:
purchase→ Purchase/Sale conversionadd_to_cart→ Add to Cart conversion (if you have one set up)view_item→ Page View conversion (optional)
Which conversion events should you track? Start with purchase only. Triple Whale’s attribution works best when you’re not diluting the signal with too many conversion types.
Step 3: Set Up URL Parameter Passthrough
This is where 70% of setups break. You need to persist Google Ads parameters across your entire site session.
Add this script after your Triple Whale pixel:
<script>
// URL parameter persistence for Triple Whale
(function() {
const STORAGE_KEY = 'tw_tracking_params';
const PARAM_EXPIRY = 30 * 24 * 60 * 60 * 1000; // 30 days
function getTrackingParams() {
const params = new URLSearchParams(window.location.search);
const trackingData = {
gclid: params.get('gclid'),
utm_source: params.get('utm_source'),
utm_medium: params.get('utm_medium'),
utm_campaign: params.get('utm_campaign'),
utm_term: params.get('utm_term'),
utm_content: params.get('utm_content'),
timestamp: Date.now()
};
// Only store if we have actual tracking parameters
if (Object.values(trackingData).some(val => val !== null)) {
localStorage.setItem(STORAGE_KEY, JSON.stringify(trackingData));
}
return trackingData;
}
function getStoredParams() {
const stored = localStorage.getItem(STORAGE_KEY);
if (!stored) return null;
const data = JSON.parse(stored);
const isExpired = Date.now() - data.timestamp > PARAM_EXPIRY;
if (isExpired) {
localStorage.removeItem(STORAGE_KEY);
return null;
}
return data;
}
// Get current or stored parameters
const currentParams = getTrackingParams();
const storedParams = getStoredParams();
const finalParams = currentParams.gclid ? currentParams : storedParams;
// Send to Triple Whale
if (finalParams && window.TripleWhale) {
TripleWhale.track('page_view', finalParams);
}
})();
</script>
Step 4: Configure Enhanced Conversion Tracking
For better attribution accuracy, set up enhanced conversions that include order value and customer data.
Replace your basic purchase tracking with this enhanced version:
// Enhanced purchase tracking for Triple Whale
function trackTripleWhalePurchase(orderData) {
const params = JSON.parse(localStorage.getItem('tw_tracking_params')) || {};
TripleWhale.track('purchase', {
// Order information
order_id: orderData.transaction_id,
value: parseFloat(orderData.value),
currency: orderData.currency || 'USD',
// Attribution parameters
gclid: params.gclid,
utm_source: params.utm_source,
utm_medium: params.utm_medium,
utm_campaign: params.utm_campaign,
utm_term: params.utm_term,
utm_content: params.utm_content,
// Product data (if available)
items: orderData.items || []
});
}
// Call this on your checkout confirmation page
// trackTripleWhalePurchase({
// transaction_id: 'ORD123456',
// value: 129.99,
// currency: 'USD',
// items: [...]
// });
Step 5: Set Up Cross-Domain Tracking (If Needed)
If your checkout is on a subdomain or different domain, configure cross-domain tracking:
<script>
// Cross-domain parameter passing
document.addEventListener('click', function(e) {
const link = e.target.closest('a');
if (!link) return;
const href = link.getAttribute('href');
if (!href || href.startsWith('#') || href.startsWith('mailto:')) return;
// Check if it's an external domain that needs tracking
const targetDomain = new URL(href, window.location.href).hostname;
const currentDomain = window.location.hostname;
if (targetDomain !== currentDomain) {
const params = JSON.parse(localStorage.getItem('tw_tracking_params')) || {};
const urlParams = new URLSearchParams();
Object.entries(params).forEach(([key, value]) => {
if (value && key !== 'timestamp') {
urlParams.append(key, value);
}
});
if (urlParams.toString()) {
const separator = href.includes('?') ? '&' : '?';
link.href = href + separator + urlParams.toString();
}
}
});
</script>
Testing & Verification
In Triple Whale:
- Go to Settings → Pixel → Test Events
- Navigate to your website in another tab
- Perform a test purchase
- Verify the purchase event shows up in real-time with correct attribution data
Check Google Ads data flow:
- In Triple Whale, go to Attribution → Google Ads
- Compare yesterday’s conversion count to Google Ads Conversions report
- Acceptable variance: 10-20% (Triple Whale uses post-click attribution, Google Ads uses last-click)
Parameter capture verification: Open your browser’s developer tools, go to Console, and run:
console.log(localStorage.getItem('tw_tracking_params'));
You should see your stored UTM parameters and gclid.
Cross-check conversion values:
- Triple Whale total conversion value (last 7 days)
- Google Ads total conversion value (same period)
- Your actual order total from your e-commerce platform
Variance over 25% indicates a tracking problem.
Troubleshooting
Problem: Triple Whale shows 40% fewer conversions than Google Ads → Check if Triple Whale pixel is loading on mobile. Use Chrome DevTools mobile simulation and verify the pixel fires. Mobile often has issues with the localStorage implementation.
Problem: Attribution data is missing for some conversions → Your URL parameter script is probably loading after users navigate away from the landing page. Move it higher in the page load order, before any other tracking scripts.
Problem: Google Ads integration shows “No data available” → You connected to the wrong Google Ads account level. Disconnect and reconnect, making sure to select the specific ads account, not the manager account.
Problem: Purchase values in Triple Whale don’t match your actual order values → Currency mismatch or tax inclusion differences. Triple Whale might be receiving pre-tax amounts while your orders include tax. Check your purchase tracking implementation.
Problem: Cross-domain tracking loses attribution data → The domains don’t share localStorage. Implement the URL parameter passing script and ensure your checkout domain also has the Triple Whale pixel with parameter capture.
Problem: Triple Whale attribution model conflicts with Google Ads attribution → Triple Whale uses 7-day post-click, 1-day post-view by default. Google Ads uses 30-day post-click, 1-day post-view. The numbers will never match exactly — focus on trend correlation rather than absolute numbers.
What To Do Next
Start with our Attribution Setup Hub to understand how Triple Whale fits into your broader attribution strategy. If you’re running multiple ad platforms, check out our Facebook Ads attribution setup to create a unified view.
Triple Whale works best when it’s part of a complete attribution stack. If this setup feels overwhelming, contact us for a free tracking audit — I’ll review your current setup and identify what’s breaking your attribution data.
For a done-for-you setup that includes advanced customer journey mapping, check out our attribution setup service.
This guide is part of the Attribution Setup Hub — complete guides for connecting attribution tools to every major ad platform.