Before you go, take 40% off annual plans

Leave your email and get 40% off any TraceFlow plan paid annually, for your first 2 years.

Applies to annual billing only. We only use your email to honour this discount.

Skip to content
Getting started

Install tracking snippet

TraceFlow is installed with one script per website, made for you on the Zocton Dashboard. The same script also runs ZuvoChat on that website if you switch it on, so you never paste a second tag.

Where to find it

Zocton Dashboard → Websites → your website → Install & verify. In TraceFlow, the website's Overview → Website Management → Website settings links there with Manage on Zocton Dashboard.

Before you start

  • The website is added on the Zocton Dashboard with TraceFlow switched on — see Quick setup.
  • You can change the HTML of every page, or your site builder's header settings.

Get your install script

  1. Open the Zocton Dashboard and go to Websites.
  2. Find your website and click Install & verify.
  3. Copy the Install script. It looks like this, with your own data centre and site id:
Code
<script async src="https://<region>.zocton.com/dashboard/z.js?site=zsite_…"></script>
  1. Paste it into every page of your website (see below for your platform).
  2. Verify the website (below). Once it is verified, visits start to show in TraceFlow.

The Zocton Dashboard Websites page with a website's install script and verification

Always copy the script from the Dashboard: the address and the site id are your own.

Plain HTML

Put the script inside the <head> of every page, or just before the closing </body> tag.

WordPress

Use a plugin that adds code to the header of every page (for example Insert Headers and Footers), or add the script to your theme's header.php after <?php wp_head(); ?>.

Shopify

Go to Online Store → Themes → Edit code → theme.liquid and paste the script just before </head>.

Next.js / React

Use the Next.js Script component in your root layout, with your own address:

ReactCode
import Script from 'next/script'; <Script src="https://<region>.zocton.com/dashboard/z.js?site=zsite_…" strategy="afterInteractive" />

Astro

Add it to your base layout's <head> with is:inline, so Astro leaves it as it is:

Code
<script is:inline async src="https://<region>.zocton.com/dashboard/z.js?site=zsite_…"></script>

Verify the website

TraceFlow records nothing for a website until it is verified. Verify it once, on the Zocton Dashboard, under Install & verify → Verify this website. Use either way:

  1. With the install script — put the script on the home page (or type the address of another page that carries it) and click Check the website. The page's own HTML must carry the script: a copy added by a tag manager cannot be seen.
  2. With an emailed code — choose one of the addresses offered, click Send code, and type the Six-digit code from the email.

In TraceFlow, the website then shows Verified in Website Management. Until then it shows Unverified, with Verify on Zocton Dashboard.

Testing on your own computer

When you run your website on your own computer (localhost, 127.0.0.1), the script sends visits from there too. Two switches decide what happens to them. Find both on the website's Overview → Website Management, under Website settings (the sliders icon).

SwitchDefaultWhat it does
Ignore local runsOnVisits from your own computer are not recorded and never raise an "unauthorized domain" alert.
Allow local testingOffRecords visits from localhost and 127.0.0.1 like any other, so you can check your install before the website goes live. Works only on a verified website.

To test your install locally:

  1. Verify the website first.
  2. Switch Allow local testing on.
  3. Open your site on your own computer and check that the visit shows under People.
  4. Switch Allow local testing off when you are done. The test visits stay in your reports until you delete them.

Good to know

  • The script loads in the background (async), so it does not hold up your page.
  • Only your website's own domain is accepted. The www. form of your address is accepted too, but another subdomain is a separate website. Visits from any other domain are refused, and you can be notified ("Script used on another domain") through your Zocton Dashboard notifications.
  • Changed your address on the Dashboard? A new domain needs verifying again.
  • Single-page apps: the script counts each page load, back and forward navigation, #anchor changes and Astro page transitions. Other in-app page changes may not count as a new page view.
  • Consent: where the law asks for it, load the script only after your visitors agree — see GDPR compliance.
Last modified on