Skip to content

Wix

Wix builds and serves your pages for you, so there is no template to edit and no <head> you can reach directly. Both routes below end at the same place: one <script> tag in the head of every page on your site.

This guide covers Wix and Wix Studio sites.

Open the Wix App Market from your site's dashboard, search for Statable, and add it to your site.

After it installs, the app opens on a single screen asking for your Site ID. That is the number in your tracking snippet, from Site settings → General → Tracking Code in Statable. Paste it and press Connect.

That is the whole setup. The app writes the tag into the head of every page and keeps it there through publishes, theme changes and new pages. Reopen the app any time to see which site it is counting into, or to point it at a different one with Update.

No account yet?

Add your site in Statable first, so there is a Site ID to paste. The trial needs no card.

The app stores your Site ID and nothing else. It reads no site content, no contacts and no orders, and it holds no key to your Statable account, so it cannot read your statistics either. Your numbers stay in the Statable dashboard.

Removing it

Uninstalling the app from Apps → Manage Apps takes the tag off your pages with it. Nothing already recorded is affected: the site and its history stay in your Statable account, and reinstalling picks up where it left off.

Option 2: Custom Code

Use this when you would rather not install an app, or when your header is already managed in one place.

  1. In your site's dashboard, go to Settings → Custom Code.
  2. Press Add Custom Code.
  3. Paste the snippet, replacing YOUR_SITE_ID:

    <script defer src="https://statable.com/js/YOUR_SITE_ID/s.js"></script>
    
  4. Name it something you will recognise later, for example Statable.

  5. Under Add Code to Pages, leave All pages selected, with Load code once.
  6. Under Place Code in, choose Head.
  7. Open the Code Type tab and pick a category, as described below.
  8. Apply, then publish the site.

If your dashboard has no Custom Code panel, your Wix plan does not include it. Use the app instead.

The Code Type setting

This is the part that decides whether the tracker runs at all, and it applies to both routes.

Wix sorts third-party code into four categories, and a visitor's answer to your cookie banner decides which ones load. Analytics code waits for consent. Essential code loads regardless.

The Statable app registers itself as Analytics, which is the honest category for what it does, and it is what Wix's own review expects from an analytics tool. The consequence is worth knowing before you go looking for missing numbers: on a site with Wix's cookie banner switched on, visitors who decline analytics are not counted.

Pasting the snippet yourself lets you make that call differently. Statable sets no cookies and writes nothing to the visitor's device, so there is a real argument for Essential. But it is your site, your privacy notice, and your regulator, so decide it deliberately rather than by leaving the default.

Wix's banner is under Settings → Compliance, privacy & cookies. A site with no banner loads every category.

Tracking custom events

Add a second Custom Code entry, placed in Body - End so it runs after the page is parsed:

<script>
  document.addEventListener('click', function (e) {
    if (e.target.closest('#signup')) {
      window.statable && window.statable.t('Signup', { plan: 'pro' });
    }
  });
</script>

The listener goes on document rather than on the element itself. Wix renders much of a page after your snippet has run, so an element you look up directly may not exist yet.

Event naming is covered in Custom events.

Excluding your own visits

Statable respects a per-browser opt-out flag. Open your published site, then run this once in the browser console:

localStorage.setItem('analytics_ignore', 'true')

Remove it with localStorage.removeItem('analytics_ignore'). Working in the Wix editor does not generate pageviews either way; only the published site carries the tag.

Verify it's working

  • Publish the site. An unpublished Wix site carries no third-party code at all, so there is nothing to check before that.
  • Open Statable Realtime in your dashboard.
  • Visit your published site in an incognito window, and accept analytics if a banner appears.
  • The full checklist is in Verify installation.

Common pitfalls

  • Checking before publishing. Wix applies both the app's tag and Custom Code at publish time. The editor and preview show nothing.
  • A cookie banner in front of it. With the code type set to Analytics, declining visitors are never counted. If your numbers look low rather than absent, this is usually why.
  • The app and a pasted snippet at once. Two Statable tags on one page do not double your data: the first one the browser reaches takes the page and the second returns without sending anything. Pick one route.
  • Connecting a domain later. A site on the free Wix address and the same site on your own domain are different hostnames, but the tag carries the same Site ID, so moving does not split your history. If you keep a hostname allowlist, add the new domain to it first, or its visits are dropped.
  • Wix's own analytics. Wix Analytics and Statable count independently and will not agree exactly. Neither one interferes with the other.

See also: Install the tracking script, Custom events, JavaScript API.


Ready to take control of your web analytics? Try Statable free for 30 days. No credit card required, full feature access, built for GDPR. Start your free trial or view a live demo.