This guide gets you from zero to seeing your traffic data—including consent rates and tracking health.
By the end of this guide, you'll have:
After signing up, create an attribution ID (data stream) for your website:
example.com)For most users, this also creates your organization and property automatically.
Add the TrustData tracking script to your website, just before the closing </head> tag:
<script>
(function(w,d,s,u,n){
w[n]=w[n]||[];
w[n].push(['init','YOUR_ATTRIBUTION_ID',{sendPageView:true}]);
var f=d.getElementsByTagName(s)[0],j=d.createElement(s);
j.async=1;j.src=u;f.parentNode.insertBefore(j,f);
})(window,document,'script','https://t.trustdata.tech/t.js','trustdata');
</script>
Replace YOUR_ATTRIBUTION_ID with the Attribution ID from Step 1.
Once installed, verify data is flowing:
After a few visitors, your dashboard will show:
| Metric | What It Tells You |
|---|---|
| Total Visitors | All traffic hitting your site |
| Consent Rate | % who accepted tracking |
| Adblock Rate | % using ad blockers |
| Tracking Health | Whether data is flowing correctly |
If you use a consent management platform (CMP), connect it to TrustData:
// After user consents via your CMP
trustdata.push(['setConsent', {
analytics: true,
advertising: true,
preferences: true,
sale_of_data: false // CCPA
}]);
TrustData will track consent rates across all four levels.
To see unified attribution across your ad channels:
Before connecting, update your ad URLs to include TrustData parameters:
Google Ads example:
https://example.com/landing?trdt_cpid={campaignid}&trdt_agid={adgroupid}&gclid={gclid}
Meta Ads example:
https://example.com/landing?trdt_cpid={{campaign.id}}&trdt_agid={{adset.id}}&fbclid={{click_id}}
Data will sync overnight. You'll see unified attribution the next day.
When you create an attribution ID, TrustData automatically enables critical alerts:
| Alert | What It Catches |
|---|---|
| Tracking Error | SDK errors or failed event ingestion |
| Sync Failure | Data source sync fails |
| Data Freshness | No new data in 24+ hours |
You'll be notified immediately if tracking breaks. No setup required.
To customize thresholds or add performance alerts, go to Settings → Alerts.