Connect

How to install the website visits tag

Updated

In the Site connection (in Settings › Integrations), turn on Count website visits, click Copy code and paste it into the <head> of every page (or into your tag manager). Then connect the tag to your cookie banner and add the URL parameters to your ads.

Step by step

  1. Open the Site connection

    In Settings › Integrations, click the name of the Site connection (or create one, as in website form leads).

  2. Turn on visits

    In the Website visits section, turn on Count website visits.

  3. Install the tag

    Under 1. Install the tag, click Copy code and paste it into the <head> of every page on the website.

  4. Connect it to consent

    Under 2. Cookie consent, copy the call and have your website’s cookie banner run it when the visitor accepts. Details in consent and domains.

  5. Add the parameters to your ads

    Under 3. URL parameters in your ads, click Copy parameters and paste them into the “URL parameters” field of every ad that points to the website.

What the tag measures

  • Site opens: every entry the tag measures.
  • Site visits: entries with interaction (tap, click, key press or scroll). Someone who opens the page and leaves without touching the screen doesn’t count as a visit.
  • CTA clicks: clicks on WhatsApp, phone and email buttons, form submissions and links to other websites. Phone and email count only the type, never the number or address.
  • Unique visitors, Visit → lead and Drop-off before the site (people who clicked the ad and never reached the website).

To give a button its own name, add data-tc-cta="name" to the element. The numbers show up in Analytics (website visits in reports) and are directional: ad blockers and visitors without consent reduce what can be measured.

Tie the visit to the lead

  • WhatsApp: replace the wa.me on your website’s buttons with the tracked link. With consent, the tag adds the visitor and the UTMs to the link, and the lead who messages inherits the visit. A direct wa.me counts as a click but doesn’t tie the visit to the lead.
  • Form: add a hidden field <input type="hidden" name="tc_visitor_id">. The tag fills it in, and your website’s server sends the value as visitorId in the lead webhook. If the lead arrives without UTMs, it inherits those of that visitor’s most recent paid visit (7 days).

Example

Fictional example: Example Co. installs the tag on example.com and uses the parameters in its ads. In one week, the “Testimonial video” ad got 1,000 link clicks, 700 site visits (30% drop-off before the site), 90 clicks on the WhatsApp button and 40 leads from the website: 5.7% visit → lead.

Didn’t work? See…

  • Nothing comes in: check that the code is on every page and that Count website visits is on. Changes to the connection take up to 60 seconds to apply.
  • If you filled in the domains: the website’s host must be on the list, with and without www (consent and domains).
  • Visits “without an ad”: the URL parameters are missing.
  • Few unique visitors: only people who accepted the measurement cookie are counted.

Frequently asked questions

Can I install it through a tag manager?

Yes. Paste the tag code into an HTML tag that fires on every page.

Is the ID in the tag code a secret?

No. It identifies the connection but grants no access. The lead webhook secret stays on the server only.

Why do I have fewer visits than ad clicks?

That’s normal: some people leave before the page loads or without interacting. That gap is the drop-off before the site.

See the path from ad to sale in your WhatsApp.

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