TrustData
Tracking

Overview

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

The TrustData Tracking SDK is a lightweight JavaScript library (about 7KB gzipped) 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 sends the page URL, manages visitor identity (cookie + local storage), and records consent and adblock status. Events called before the script loads are queued, then each event is sent to the event server as it happens.

The event server validates and enriches each event, reads the URL parameters from page_location (trdt_cpid/agid/kwid/ctid, utm_* and click IDs), 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, gbraid, wbraid, fbclid, ttclid, msclkid, li_fat_id, and more)
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

  • About 7KB gzipped
  • Async loading (non-blocking)
  • No external dependencies

Privacy-focused

  • No device reads in the browser without analytics consent
  • Consent-aware storage: no client-side storage without consent, first-party cookie with consent
  • Integrates with consent management platforms
  • IP truncation, PII gating, and salt rotation are enforced by the platform and can't be turned off

Configurable

These settings live in the dashboard, not in the SDK code. Open Settings → Attribution IDs, select an attribution ID, and use the Delivery and Filtering tabs:

  • 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.
Install through the TrustData Web Tag template.
Serve tracking from your own domain.
Standard events and custom event tracking.

Tracking product page on trustdata.tech · Free trial