Skip to main content
Scale 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:

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?

Scale Plan

First-party tracking serves the tracker, and receives tracking data, from a subdomain of your own site. Because the requests look like they come from your own domain, they survive ad blockers and browser tracking protection (Firefox ETP, Edge Tracking Prevention, and similar) that would otherwise block calls to a separate analytics host.

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

How It Works

  1. Visitor loads your page at yoursite.com
  2. Browser fetches the tracker from z.yoursite.com (a subdomain of your own site)
  3. Tracking data is sent to z.yoursite.com
  4. Your subdomain transparently proxies requests to Zenovay
  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
  • Resilient to tracking protection: Bypasses Firefox ETP, Edge Tracking Prevention, and similar

Considerations

  • Requires a CNAME DNS record on your domain
  • Takes time for DNS and SSL to propagate
  • Available on the Scale and Enterprise plans
  • First-party proxy events are metered separately from your monthly event allowance (you can see them under Settings → Usage in the First-Party Tracking card)

Setting Up First-Party Tracking

First-party tracking is configured per website. You need the Scale or Enterprise plan, and you must be a workspace owner or admin to add or verify a custom domain.

  1. Choose Your Subdomain

    Pick a subdomain on your own domain to serve analytics. We recommend z.yoursite.com. Other common choices:

    • z.yoursite.com (recommended)
    • data.yoursite.com
    • stats.yoursite.com
    • t.yoursite.com

    Avoid obvious names like "analytics", "tracking", or "zenovay", which some ad blockers target by keyword.

  2. Add CNAME Record

    Add a CNAME DNS record in your domain registrar pointing your chosen subdomain at Zenovay's proxy:

    TypeNameValue
    CNAMEzproxy.zenovay.com

    Replace "z" 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 z.yoursite.com
    

    Or use online tools like dnschecker.org

  4. Verify the Domain

    Once the CNAME is in place, verify the domain so Zenovay can issue an SSL certificate for it. Verification is triggered from your website's configuration in the dashboard. SSL is provisioned automatically once the record resolves correctly, which can take a few minutes.

  5. Update Your Script

    Update your tracking script to load from your subdomain. The first-party snippet uses the /script.js path:

    <script
      defer
      src="https://z.yoursite.com/script.js"
      data-tracking-code="YOUR_TRACKING_CODE"
    ></script>
    
The tracking-script card in the Zenovay dashboard showing HTML, React, Next.js, and First-Party tabs with an install verification button.
Use the First-Party tab on the tracking-code card to copy the snippet that loads from your own subdomain.

DNS Configuration by Provider

In every case below, the record is a CNAME pointing to proxy.zenovay.com. Replace z with whatever subdomain you chose.

Cloudflare

  1. Go to your domain's DNS settings
  2. Click Add Record
  3. Select CNAME type
  4. Enter subdomain name (e.g., "z")
  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: z
  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: z
  5. Value: proxy.zenovay.com

Route 53 (AWS)

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

Verifying Your Setup

After DNS propagation, verify your first-party tracking:

Check DNS Resolution

nslookup z.yoursite.com

Should resolve to 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 script.js loads from your subdomain

Check Data Collection

  1. Visit your website
  2. Open your website's dashboard and check the Live View 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:

  • Zenovay provisions the SSL certificate automatically once the CNAME resolves
  • Wait up to 24 hours for certificate provisioning

Tracking Not Working

  1. Verify DNS resolves correctly
  2. Check browser console for errors
  3. Ensure your 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 a fallback: Consider loading the standard third-party snippet if first-party isn't yet verified
  • Monitor blocking rates: Compare data before/after to measure improvement

Comparing Accuracy

Switching from third-party to first-party tracking typically recovers visits that ad blockers and browser tracking protection would otherwise drop. The exact improvement depends on your audience: sites with privacy-conscious or technical visitors tend to see the biggest gains. Compare your numbers for a few days before and after the switch to measure the difference for your own traffic.

Was this article helpful?