Connect

Cookie consent and domains for the website tag

Updated

The tag starts out anonymous: without consent, it only counts the entry, with no cookie. When the visitor accepts ad measurement in the banner, the website calls tc('consent', true); if they decline or revoke, tc('consent', false). In Website domains, you limit which addresses can send visits (up to 10).

Without consentWith consent
CookieNone (no local storage either)First-party _tcv cookie, for up to 180 days
What it countsOnly the entry to the website and the button clicks on that pageThe whole visit, the pages and the clicks
Unique visitorDoesn’t existYes
Ties the visit to the leadNoYes (tracked link and form)

An old cookie doesn’t turn on full mode by itself: only the explicit consent call counts. The IP is never stored, and visits are deleted after 90 days (only the daily totals remain).

  1. In the Site connection, Website visits section, find 2. Cookie consent and click Copy call.
  2. In your banner (or consent manager), call tc('consent', true) when the visitor accepts the ad measurement category, on every page for as long as the choice holds.
  3. When they decline or revoke, call tc('consent', false): the cookie is deleted and the tag goes back to anonymous mode.
  4. Mention the _tcv cookie in your privacy policy.

Suggested privacy policy wording (adapt it): “With your consent in the ad measurement category, we use a visit measurement tool that sets the _tcv cookie (a random browser identifier, for up to 180 days) to know which ad a visit came from, which buttons were clicked and, if you contact us, to tie the visit to your contact. Without consent, we only count the entry to the website, with no cookie. The IP address is not stored. Visit records are kept for 90 days.”

Website domains

In Website domains, list the addresses allowed to send visits, separated by commas, and click Save domains. With the list filled in, visits from other addresses are discarded; when it’s empty, any website with the tag counts. The change takes up to 60 seconds to apply.

  • Host only, without https:// or a path: example.com, not https://example.com/shop.
  • The match is exact: list example.com and www.example.com if the website opens on both.
  • Include test domains or pages published at another address if you want them to count.
  • Up to 10 domains.

Example

Fictional example: Example Co. has its website at www.example.com and its landing pages at lp.example.com. It fills in example.com, www.example.com, lp.example.com. The cookie banner calls tc('consent', true) when the visitor accepts “Ad measurement”. A copy of the website published by mistake at another address stops adding visits.

Didn’t work? See…

  • Visits stopped after saving the domains: a host is missing from the list (often the version with or without www).
  • Unique visitors at zero: the banner isn’t calling tc('consent', true).
  • More about privacy and retention in privacy and the LGPD (Brazil’s data protection law).

Frequently asked questions

Do I need consent to use the tag?

Without consent, the tag runs in anonymous mode, with no cookie. For full mode, with the cookie, call tc('consent', true) only after the visitor accepts. Check the privacy rules that apply to your website.

How long does the cookie last?

Up to 180 days. It’s deleted when the website calls tc('consent', false).

Do I have to fill in the domains?

It’s not required, but it’s recommended: it keeps copies of your website or third-party pages from counting visits.

See the path from ad to sale in your WhatsApp.

Try TraceClose free for 7 days with your team. No card needed to try.