Developer
Install the tracking script
First-party capture is a no-code setup: paste one script tag, then add one DNS record so it loads from your own domain. For what first-party capture is and why it matters, see the product page.
Step 1: Add the script to your head
Paste this one line inside the <head> of every page. Replace YOUR_COP_KEY with your public key from Settings, then API Keys. This is the script that captures the visit.
<script id="datacops_script"
src="https://cdn.joindatacops.com/script?cop_key=YOUR_COP_KEY" async></script> On its own, this already works: the script loads and captures. But it is loading from the shared DataCops domain, which is the easiest thing for a blocker to catch. Step 2 makes it first-party.
Step 2: Point a subdomain with one DNS record
In your domain's DNS settings, add this record. It points a subdomain of your own site at DataCops, so the script starts loading from your domain instead of the shared one.
| Type | Host | Value |
|---|---|---|
| CNAME | datacops | cdn.joindatacops.com |
That gives you datacops.yourstore.com. DataCops then issues a real, valid certificate for that exact subdomain and serves the capture script from it. From the browser's point of view, a request to your own subdomain is a first-party request, not a third-party one, so it is not stripped.
Most providers apply the record in one to ten minutes. If your provider supports one-click domain connect, like Cloudflare, GoDaddy, or IONOS, DataCops can add the record for you instead. Once it is verified, the script switches to your own domain automatically. No code change is needed on your side.
Verify
Load any page of your site, then check your DataCops dashboard. The visit appears within seconds. Once the DNS record is verified, the script tag above automatically starts serving from your own subdomain, so you never edit the tag again.