Domains and identity
List every hostname your product runs on. ClickClacks only accepts events from those, and follows one person across them when they click from one to another.
Updated
Allowed domains
Each source has a primary domain, and you can add more under Anywhere else your product runs when you create it. Later, add domains on the Identity page in Sources. The data-domains attribute in your snippet is built from the domains of every website and web app source in the project, plus any extra domains you added, so the tracker knows which hostnames belong together. (If you switch off Carry identity between these domains on the Identity page, each source’s list is just its own domain.)
<script async src="https://app.clickclacks.io/c.js" data-key="pk_live_3f9a1c7e5b2d4f6a8c0e1b3d" data-domains="acme.com,www.acme.com,app.acme.com" data-consent="opt-out" data-respect-gpc="on"></script>- Entries are exact hostnames. There are no wildcards, and
acme.com,www.acme.comandapp.acme.comare three separate entries. List each one visitors actually see in the address bar. - Unlisted hostnames are rejected. On a hostname that isn’t in
data-domains, the tracker doesn’t start. On the server, events whose origin isn’t in the source’s saved list are refused, so a copied snippet can’t pollute your data. - Both lists need the domain. The browser checks the attribute; the server checks the saved list. After adding a domain in the app, copy the updated snippet from the source, or add the hostname to
data-domainsyourself.
One person across domains
A project is one product, and its sources share one pool of people. That’s what lets a funnel start on your marketing site and finish in your app. The tracker keeps its anonymous ID in the browser’s local storage, which browsers keep separate for every hostname, so acme.com and app.acme.com can’t read each other’s. ClickClacks bridges the gap through links instead:
- 01Click
A visitor on acme.com clicks a link to app.acme.com. Both hostnames are listed.
- 02Tag
The tracker adds a _ccid parameter to that link, carrying the visitor’s anonymous ID and session.
- 03Adopt
On app.acme.com the tracker checks the visit came from a listed domain, adopts the IDs, and removes _ccid from the address bar.
No markup changes are needed, on your side or in any site builder. The rest of the link’s query string is left as it was. The first pageview after the hop records the domain the visitor came from.
This works the same between subdomains of one domain (acme.com to app.acme.com) and between entirely different domains (acme.com to getacme.io), as long as both hostnames are listed.
Where carry-over stops
Identity only travels on a link click between two listed hostnames. It doesn’t carry when:
- The visitor doesn’t click a link. Typing the address, opening a bookmark or following a link in an email starts a new anonymous visitor. So does navigation done in script (for example setting
location.href) or a form submission, because only<a>links are tagged. - A hostname isn’t listed. Links to it aren’t tagged, and the tracker doesn’t run there.
- The referrer is removed. The destination only accepts the ID when the browser reports a listed domain as the referrer. A link with
rel="noreferrer", or aReferrer-Policyofno-referrer, stops the hand-off. - The hop is into a native app. Links carry identity from web to web only. A mobile app joins the same person when it calls
identifywith the same ID.
The ID you set with identify is stored per hostname too, and isn’t part of the hand-off. Call identify on each domain where the person is signed in.
The carry-over rate
Rather than asking whether your domains are set up correctly, ClickClacks measures it. The carry-over rate is, of the people who followed a link from one listed domain to another and arrived within 30 minutes, the share whose first event already carried an ID ClickClacks knew. It’s shown as Is it working on the Identity page, and below 80% it is flagged. The rate appears once enough real linked arrivals have been seen.
Serve from your own domain
You can also load the tracker and send events through a subdomain of your own, such as cc.acme.com, instead of app.clickclacks.io. That has its own page: Custom domain. Allowed domains and carry-over work the same either way.
Next steps
- Identify people: join visits to your user IDs on each domain.
- Custom domain: first-party serving.
- Debugging: when events from one domain don’t arrive.