← Back to Trustlytics Sign in
Support Center Settings Tracking code Add the tracking code in Wix

Add the tracking code in Wix

Wix manages custom code in a separate area. You paste the tracking code in there once, decide which pages it runs on, and switch it on. That takes about five minutes

Two settings are critical along the way: the placement in the head section and the code type "Essential". Get one of them wrong and Trustlytics counts nothing at all, or only part of your visitors

One quick look often does it. Or follow along step by step:

The video is in the works. Until then, the guide will get you there.

Step-by-step guide

What you need for this

Two conditions from Wix: custom code can only be added when your website is published and a custom domain is connected to it. That usually requires a paid Wix plan. With a free website on a wix.com address, this feature is not available.

  • Your tracking code. You get it under Tracking code with one click on "Copy".
  • Access to your Wix dashboard. Meaning the management area of your website, not the editor.

Getting to the code manager

  1. Sign in to Wix and select the website you want to measure.
  2. In the dashboard, click "Settings" on the left.
  3. Scroll down to the "Development & integrations" section and click "Custom code".
Are you in the editor instead of the dashboard? This setting only lives in the management area of your website, not in the editor. Leave the editor and switch to the dashboard.
Add the tracking code in Wix: Settings - Trustlytics
Add the tracking code in Wix: Development & integrations - Trustlytics

Adding the tracking code

At the top right, click "+ Add Custom Code". A window with several fields opens.

Paste your tracking code into the large text field.

Use the copy button. Selecting it by hand, and a character is quickly lost, and then Trustlytics counts nothing at all.
Add the tracking code in Wix: Add Custom Code - Trustlytics
Add the tracking code in Wix: Adding the tracking code - Trustlytics

Giving it a name

Below that, you enter a name. Just write Trustlytics in there.

That is not a formality. As soon as you add a second or third code later, the name is the only thing that tells them apart. Without a label, you end up with several identical-looking entries and no idea which one is for what.

Add the tracking code in Wix: Giving it a name - Trustlytics

Selecting pages

Under "Add Code to Pages" you choose "All pages".

A second question appears below: should the code load once per visit or on every page someone opens? Choose "Load code on each new page".

Why that second setting matters: if the code only loads once per visit, Trustlytics counts the entry and nothing after that. Your visitors click through five pages, and your report shows one. With the right setting, every page view gets captured.
Add the tracking code in Wix: Selecting pages - Trustlytics

Placement

Under "Place Code in" you have three options: Head, Body – start, and Body – end.

Choose "Head". Only there does the code load early enough for short visits to be counted reliably. With either of the other two options, you lose part of your numbers.

Add the tracking code in Wix: Placement - Trustlytics

Code type

Before you save, one setting is still missing: the code type. Wix wants to know which privacy category your code belongs to so the website can stay compliant. At the top of the window, click "Code Type".

Choose "Essential".

Then click "Apply".

Why that is allowed: Trustlytics does not set cookies. Your visitors therefore do not have to consent to the measurement, and the code can be classified as essential. That is exactly the difference from Google Analytics and similar tools.

And why it matters: classify the code in a category that requires consent, and it only loads for visitors who agreed. Your numbers would then be incomplete without you noticing.

Add the tracking code in Wix: Code type - Trustlytics

Checking and activating

You land back in the overview. Check three things on your entry:

Setting What it should say
Section Head
Applied on All pages
Code type Essential

If one of them is off, click the entry and correct it.

And finally the toggle. To the right of your entry sits a toggle. If it is on the left and gray, the code is not active yet. Click it so it jumps to the right and turns colored.

Almost everyone misses this toggle. The code is stored correctly, but it does not run. And because everything looks right, people then hunt for the problem everywhere except here.
Add the tracking code in Wix: activating - Trustlytics
Add the tracking code in Wix: activated - Trustlytics

Checking

Now the moment of truth, and it takes less than two minutes:

  1. Open your website in a new browser window.
  2. Click through a few pages.
  3. Switch to the Real-time report in Trustlytics.
  4. Within a few seconds, your own visit should show up there.

If something is there, everything is installed correctly. If it stays empty, the section below will help.

Important when testing: open your website through the real address, not through the preview in the editor. Custom code does not run in the preview.

When nothing gets counted

Five causes cover almost every case:

Cause What to do
Toggle not activated The most common case. Check in the overview whether the toggle is on the right and colored.
Wrong placement Does it say "Body" instead of "Head"? Open the entry and switch it to Head.
Wrong code type If it says anything other than Essential, the code only loads after consent. Change it to Essential.
Website not published Custom code only runs on the published website with a custom domain, not in the preview.
Wrong address registered The code only works on the website listed in your Trustlytics account. Check that under Website.

Common questions

Do I need a paid Wix plan?
Yes. Custom code is only available when your website is published and a custom domain is connected to it. Both of those usually require a premium plan.

I cannot find "Custom code" in the settings. What is going on?
Scroll far enough down, the "Development & integrations" section sits at the end of the list. If it is missing entirely, your website is not published yet, or the custom domain is missing.

Why "Essential" and not "Analytics"?
Because Trustlytics does not set cookies and therefore does not need consent from your visitors. Classify the code as an analytics code, and it only loads for visitors who agreed to a cookie banner. Your numbers would then be incomplete.

What does "Load code once" mean compared to "Load code on each new page"?
With "Load code once", the code only loads on entry. Every other page someone clicks is not counted. So choose "Load code on each new page".

Can I remove the code later?
Yes. Open "Custom code" and delete the entry. Or just switch it off if you want it back later. One click on the toggle does that.

Will my website get slower because of it?
The script is tiny and loads in the background without holding up the rest of your page.

Do my visitors need a cookie banner now?
No. Trustlytics works without cookies. Your visitors do not have to click anything away.

Was this article helpful?