Tracking Script
Paste this in the footer of any page you want to track
<!-- -- sh data 021726 -- -->
<script>
(function() {
var params = new URLSearchParams(window.location.search);
window.__kd_params = {
fbclid: params.get('fbclid'),
gclid: params.get('gclid'),
dclid: params.get('dclid'),
wbraid: params.get('wbraid'),
gbraid: params.get('gbraid'),
clickid: params.get('clickid'),
ttclid: params.get('ttclid'),
msclkid: params.get('msclkid'),
li_fat_id: params.get('li_fat_id'),
sccid: params.get('ScCid') || params.get('sccid'),
utm_source: params.get('utm_source'),
utm_medium: params.get('utm_medium'),
utm_campaign: params.get('utm_campaign'),
utm_content: params.get('utm_content'),
utm_term: params.get('utm_term'),
page_url: window.location.href,
referrer: document.referrer
};
var s = document.createElement('script');
s.src = 'https://cookie-tracker-endpoint-985883626646.us-central1.run.app/v1/tracker.js';
s.async = true;
document.head.appendChild(s);
})();
</script>Installation
Direct Paste (Advertorials, Unbounce, WordPress)
- Copy the script above
- Paste it in the footer of your page, just before the closing
</body>tag - Save and publish
Google Tag Manager
- In GTM, go to Tags → New → Custom HTML
- Paste the script above
- Set trigger to All Pages
- Preview, verify in Network tab, then Publish
Verification
- Open DevTools → Network → filter “cookie-tracker”
tracker.jsshould load (200) andeventsshould POST (204)- Check Application → Cookies for
_vid,_sid,_fts
What This Captures
Click IDs
fbclid, gclid, ttclid, msclkid, and more
UTM Parameters
source, medium, campaign, content, term
Platform Cookies
_ga, _fbp, _gcl_aw, _ttp, _uetvid
Behavioral Data
scroll depth, time on page, clicks, CTA
Device Fingerprint
canvas, WebGL, audio, fonts, screen
Bot Detection
webdriver flags, headless viewport, movement
Endpoint
Collection URL
cookie-tracker-endpoint-985883626646.us-central1.run.appBigQuery Dataset
redtrack-import-12-16-25.cookies_production