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.
- Open Settings › Custom domain and click Add a domain. Enter a subdomain, such as
cc.acme.com, and click Continue. A bare domain such asacme.comisn’t accepted. - 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.
- Click Check now. When the domain is live, change the script’s
srcin your snippet. Everything else in the snippet stays the same.
Setup states
| State | Means |
|---|---|
| Waiting for DNS | The CNAME record hasn’t been seen yet. DNS changes can take a while to spread. |
| Turning on HTTPS | The record is right, and a certificate is being issued. |
| Needs a small fix | The record points somewhere else. The page says what it found, or you can use a different subdomain. |
| One more record needed | Your domain’s CAA records don’t allow Let’s Encrypt. Add the record shown. |
| Live | Your 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.
- Add
cc.acme.comin Settings › Custom domain and create the CNAME. - Wait for Live, then change the snippet’s
srcon the site and deploy. - Do the same in the app, and watch where events are arriving until everything uses the new domain.