Docs / First-party domain

First-party tracking domain

Serve tracking from your own subdomain so ad blockers stop filtering it.

Why this matters

Ad blockers mostly work from lists of third-party domains. A request to an analytics vendor's domain is easy to spot and block; a request to dataopenapi.yoursite.com is not, because from the browser's point of view it is first-party — the same origin as the page itself.

In practice this recovers roughly 10–30% of traffic, depending on your audience. Technical and privacy-conscious audiences sit at the top of that range.

This also covers the tracking script itself, not just the measurement requests. Blockers filter oa.js by URL as well, so we serve it from your domain too.

What you need

It has to be a subdomain. DNS does not permit CNAME records on a bare domain (yoursite.com), so use dataopenapi.yoursite.com instead.

Setting it up

  1. In the console, open your project and go to Tracking domain. Enter the subdomain you want to use and save it.
  2. Add the CNAME record shown there at your DNS provider. It looks like this:
    TypeCNAME
    Namedataopenapi.yoursite.com
    Valueingest.openanalyticsapi.com
  3. Once the record is live, press Verify DNS. Propagation takes anywhere from a couple of minutes to a few hours depending on your provider's TTL.
  4. We issue a TLS certificate for your subdomain and activate it. This step is currently manual on our side and takes up to 24 hours. You do not need to do anything while it runs.
  5. When the domain shows as Active, the console gives you a ready-made snippet. Replace your existing one with it.

The snippet

Compared to the standard snippet, both the script URL and data-api point at your own domain:

<script async defer
  src="https://dataopenapi.yoursite.com/oa.js"
  data-site="YOUR_SITE_ID"
  data-api="https://dataopenapi.yoursite.com"></script>

The replay and heatmap add-ons work the same way — point their src at your domain as well.

Good to know

Part of the Open API ecosystem