TrustData
Tracking SDK

Overview

First-party event tracking with full visibility, including consent rates and adblock detection.

The TrustData Tracking SDK is a JavaScript library under 5KB that measures all of your traffic, not only the visitors who consent.

What makes it different

Traditional analytics only shows you consented traffic. TrustData shows you:

Traditional analyticsTrustData
~70% of visitors (consented only)100% of visitors
No consent rate dataExact consent acceptance rate
Blocked by ad blockersAdblock detection and rate
Third-party cookies (often blocked)First-party tracking

Why first-party tracking?

Third-party cookies are increasingly blocked:

  • Safari: Blocks all third-party cookies
  • Firefox: Blocks known trackers
  • Chrome: Removing third-party cookies
  • Ad blockers: Block most analytics scripts

TrustData uses first-party tracking:

  • TrustData collects data on your domain
  • No third-party cookies required
  • Works with all browsers
  • You own the data

Architecture

Loading diagram…

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.

What the SDK captures

Automatic data capture

The SDK automatically captures:

CategoryData
IdentityVisitor ID, session ID, user ID (if authenticated)
AttributionUTM parameters, click IDs (gclid, fbclid, ttclid, msclkid)
SessionSession number, first visit flag, entrance page
PageURL, referrer, title
DeviceBrowser, OS, screen size, device type
PrivacyConsent state (4 levels), adblock detection

TrustData tracks a 4-level consent model:

LevelPurpose
AnalyticsBasic analytics and performance measurement
AdvertisingAd targeting and conversion tracking
PreferencesPersonalization and saved settings
Sale of DataThird-party data sharing (CCPA)

You can see your consent acceptance rate for each level in the dashboard.

Adblock detection

The SDK detects ad blockers and reports:

  • Whether the visitor has an ad blocker active
  • Which platforms are being blocked
  • Your overall adblock rate

Detection probes the endpoints that the major marketing platforms use, so you can see which ones are blocked:

PlatformWhat gets blocked
google_analyticsGoogle Analytics collection
google_tag_managerGoogle Tag Manager container
google_adsGoogle Ads / AdSense
facebookMeta Pixel
tiktokTikTok Pixel
microsoftMicrosoft (Bing) Ads

This shows how much of your traffic is invisible to standard analytics.

Key features

Lightweight

  • < 5KB gzipped
  • Async loading (non-blocking)
  • No external dependencies

Privacy-focused

  • No fingerprinting
  • Consent-aware storage: no client-side storage without consent, first-party cookie with consent
  • Respects Do Not Track
  • Integrates with consent management platforms
  • IP anonymization option

Configurable

  • Session timeout (default 30 minutes)
  • Attribution lookback window (default 30 days)
  • Cross-domain tracking
  • Internal traffic filtering
  • Bot filtering (built-in + custom patterns)

SDK vs server-side

FeatureJavaScript SDKServer-side API
PageviewsAutomaticManual
Client dataFull (device, referrer)Limited
Ad blockersMay be blockedAlways works
ConversionsBothRecommended
Consent/Adblock ratesYesNo

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.

Next steps

Installation and configuration guide.
Standard events and custom event tracking.

Tracking product page on trustdata.tech · Free trial