The TrustData Tracking SDK is a JavaScript library under 5KB that measures all of your traffic, not only the visitors who consent.
Traditional analytics only shows you consented traffic. TrustData shows you:
| Traditional analytics | TrustData |
|---|---|
| ~70% of visitors (consented only) | 100% of visitors |
| No consent rate data | Exact consent acceptance rate |
| Blocked by ad blockers | Adblock detection and rate |
| Third-party cookies (often blocked) | First-party tracking |
Third-party cookies are increasingly blocked:
TrustData uses first-party tracking:
On your property, the SDK captures pageviews and events. It extracts URL parameters (trdt_cpid/agid/kwid/ctid, utm_*), manages visitor identity (cookie + local storage), and records consent and adblock status. It then queues events and sends them in batches.
The event server validates and enriches each event, detects geo (from IP) and device, filters bots, and stores the result in your analytics database.
The SDK automatically captures:
| Category | Data |
|---|---|
| Identity | Visitor ID, session ID, user ID (if authenticated) |
| Attribution | UTM parameters, click IDs (gclid, fbclid, ttclid, msclkid) |
| Session | Session number, first visit flag, entrance page |
| Page | URL, referrer, title |
| Device | Browser, OS, screen size, device type |
| Privacy | Consent state (4 levels), adblock detection |
TrustData tracks a 4-level consent model:
| Level | Purpose |
|---|---|
| Analytics | Basic analytics and performance measurement |
| Advertising | Ad targeting and conversion tracking |
| Preferences | Personalization and saved settings |
| Sale of Data | Third-party data sharing (CCPA) |
You can see your consent acceptance rate for each level in the dashboard.
The SDK detects ad blockers and reports:
Detection probes the endpoints that the major marketing platforms use, so you can see which ones are blocked:
| Platform | What gets blocked |
|---|---|
google_analytics | Google Analytics collection |
google_tag_manager | Google Tag Manager container |
google_ads | Google Ads / AdSense |
facebook | Meta Pixel |
tiktok | TikTok Pixel |
microsoft | Microsoft (Bing) Ads |
This shows how much of your traffic is invisible to standard analytics.
| Feature | JavaScript SDK | Server-side API |
|---|---|---|
| Pageviews | Automatic | Manual |
| Client data | Full (device, referrer) | Limited |
| Ad blockers | May be blocked | Always works |
| Conversions | Both | Recommended |
| Consent/Adblock rates | Yes | No |
Recommendation: Use the JavaScript SDK for pageviews, consent tracking, and client-side events. Use the server-side API for backend conversions (purchases, signups) so they are always captured.
Tracking product page on trustdata.tech · Free trial