Custom domain

Serve the tracker script and the event endpoint from a subdomain you own, such as cc.acme.com, so your analytics looks like part of your own site rather than a third party.

Updated

Why use one

By default the script loads from app.clickclacks.io/c.js. With a custom domain it loads from cc.acme.com/c.js and sends events to cc.acme.com/e. A project has one custom domain, shared by all its sources.

Set it up

It takes three steps and about ten minutes. You need an Owner, because it is under Settings.

  1. Open Settings › Custom domain and click Add a domain. Enter a subdomain, such as cc.acme.com, and click Continue. A bare domain such as acme.com isn’t accepted.
  2. At your DNS provider, add the one CNAME record shown: its name is your subdomain, and it Points to the target on screen. Leave the TTL on automatic.
  3. Click Check now. When the domain is live, change the script’s src in your snippet. Everything else in the snippet stays the same.

Setup states

StateMeans
Waiting for DNSThe CNAME record hasn’t been seen yet. DNS changes can take a while to spread.
Turning on HTTPSThe record is right, and a certificate is being issued.
Needs a small fixThe record points somewhere else. The page says what it found, or you can use a different subdomain.
One more record neededYour domain’s CAA records don’t allow Let’s Encrypt. Add the record shown.
LiveYour subdomain serves the script and receives events.

Move your sources over

Once live, the page shows your snippet on the new domain and where events are arriving, so you can see which sites still use the old address. Update each site’s snippet. The old address keeps accepting events for 30 days after your domain is verified, which gives you time to deploy.

The exact snippet, and what happens to heatmap captures, are in Domains and identity.

Tips and gotchas

  • Server events still go to app.clickclacks.io/api/v1/batch. Custom domains carry browser traffic only.
  • To remove the domain, type its hostname to confirm and click Remove domain. Point your snippets back first.

Recipes

Move our site and app onto cc.acme.com.

  1. Add cc.acme.com in Settings › Custom domain and create the CNAME.
  2. Wait for Live, then change the snippet’s src on the site and deploy.
  3. Do the same in the app, and watch where events are arriving until everything uses the new domain.