The TrustData Tracking SDK is a lightweight JavaScript library that gives you complete visibility into your traffic, not just 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 site, the SDK captures pageviews and events, extracts URL parameters (trdt_cpid/agid/kwid/ctid, utm_*), manages visitor identity (cookie + local storage), tracks consent and adblock status, then queues and batches events.
The event server then ingests at high throughput, 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 rely on, so you can see exactly 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 helps you understand how much 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) to ensure they're always captured.
Tracking product page on trustdata.tech · Free trial