Pro Plan15 minutesintermediate

First-Party vs Third-Party Tracking

Understand the differences between first-party and third-party tracking, and learn how to set up first-party tracking for better accuracy.

trackingfirst-partythird-partyprivacyad-blockers
Last updated: January 15, 2025

Understanding the difference between first-party and third-party tracking helps you choose the right approach for your website's analytics needs.

What is Third-Party Tracking?

Third-party tracking is the default method when you install Zenovay. Your website sends data to our servers at api.zenovay.com.

<script
  defer
  src="https://api.zenovay.com/z.js"
  data-tracking-code="YOUR_TRACKING_CODE"
></script>

How It Works

  1. Visitor loads your page at yoursite.com
  2. Browser fetches tracker script from api.zenovay.com
  3. Tracking data is sent to api.zenovay.com
  4. Data appears in your Zenovay dashboard

Advantages

  • Easy setup: Just copy and paste the script
  • No DNS configuration: Works immediately
  • Automatic updates: Always uses the latest tracker version

Limitations

  • Ad blockers: Some block requests to analytics domains
  • Privacy extensions: May prevent third-party requests
  • Corporate firewalls: Some organizations block external analytics

What is First-Party Tracking?

Pro Plan

First-party tracking uses your own domain for analytics, making requests appear to come from your website rather than an external service.

<script
  defer
  src="https://analytics.yoursite.com/z.js"
  data-tracking-code="YOUR_TRACKING_CODE"
></script>

How It Works

  1. Visitor loads your page at yoursite.com
  2. Browser fetches tracker from analytics.yoursite.com (your domain)
  3. Tracking data is sent to analytics.yoursite.com
  4. Your subdomain proxies requests to Zenovay servers
  5. Data appears in your Zenovay dashboard

Advantages

  • Ad blocker resistant: Requests appear first-party
  • Better accuracy: Fewer blocked requests
  • Professional appearance: Uses your domain
  • Enhanced privacy: Data flows through your domain

Considerations

  • Requires DNS configuration
  • Takes time for DNS propagation
  • Requires Pro plan or higher

Setting Up First-Party Tracking

1

Choose Your Subdomain

Pick a subdomain for analytics. Common choices:

  • analytics.yoursite.com
  • data.yoursite.com
  • stats.yoursite.com
  • t.yoursite.com

Avoid obvious names like "tracking" or "zenovay" which ad blockers might target.

2

Add CNAME Record

Add a CNAME DNS record in your domain registrar:

TypeNameValue
CNAMEanalyticsproxy.zenovay.com

Replace "analytics" with your chosen subdomain name.

3

Wait for DNS Propagation

DNS changes can take up to 48 hours to propagate globally. You can check progress using:

dig analytics.yoursite.com

Or use online tools like dnschecker.org

4

Enable in Dashboard

  1. Go to SettingsTracking Configuration
  2. Enable First-Party Tracking
  3. Enter your subdomain: analytics.yoursite.com
  4. Click Verify to confirm DNS is configured
5

Update Your Script

Update your tracking script to use your subdomain:

<script
  defer
  src="https://analytics.yoursite.com/z.js"
  data-tracking-code="YOUR_TRACKING_CODE"
></script>

DNS Configuration by Provider

Cloudflare

  1. Go to your domain's DNS settings
  2. Click Add Record
  3. Select CNAME type
  4. Enter subdomain name (e.g., "analytics")
  5. Enter target: proxy.zenovay.com
  6. Enable Proxy (orange cloud) for SSL

GoDaddy

  1. Log in to your GoDaddy account
  2. Go to My ProductsDNS
  3. Click Add under Records
  4. Select CNAME
  5. Host: analytics
  6. Points to: proxy.zenovay.com
  7. TTL: 1 Hour

Namecheap

  1. Go to Domain ListManage
  2. Click Advanced DNS
  3. Add New Record → CNAME Record
  4. Host: analytics
  5. Value: proxy.zenovay.com

Route 53 (AWS)

  1. Go to Hosted zones → your domain
  2. Click Create record
  3. Record name: analytics
  4. Record type: CNAME
  5. Value: proxy.zenovay.com

Verifying Your Setup

After DNS propagation, verify your first-party tracking:

Check DNS Resolution

nslookup analytics.yoursite.com

Should return proxy.zenovay.com or a Zenovay IP address.

Check Script Loading

  1. Visit your website
  2. Open DevTools (F12) → Network tab
  3. Filter by your subdomain
  4. Verify z.js loads from your subdomain

Check Data Collection

  1. Visit your website
  2. Check the Zenovay Live tab
  3. Your visit should appear within seconds

Troubleshooting

DNS Not Resolving

  • Wait longer for propagation (up to 48 hours)
  • Clear local DNS cache
  • Try from a different network

SSL Certificate Errors

If using Cloudflare:

  • Ensure the proxy (orange cloud) is enabled
  • Check SSL mode is "Full" or "Full (Strict)"

Without Cloudflare:

  • Our proxy automatically provides SSL
  • Wait up to 24 hours for certificate provisioning

Tracking Not Working

  1. Verify DNS resolves correctly
  2. Check browser console for errors
  3. Ensure tracking code is correct
  4. Try in incognito mode

Best Practices

Recommended Setup

Use a non-obvious subdomain name and enable first-party tracking for the most accurate analytics.

  • Choose a generic subdomain: Avoid "analytics" or "tracking" as some blockers target these
  • Test before deploying: Verify DNS works before updating production scripts
  • Keep third-party as fallback: Consider loading third-party if first-party fails
  • Monitor blocking rates: Compare data before/after to measure improvement

Comparing Accuracy

Typical improvements when switching from third-party to first-party:

MetricThird-PartyFirst-PartyImprovement
Visitors Tracked70-85%95-99%+15-20%
Ad Blocker ImpactHighMinimal-
Script Load Success80-90%98%++10-15%

Was this article helpful?