← Back to Trustlytics Sign in
Support Center Settings Tracking-Code Copy the tracking code

Copy the tracking code

Here you will find the little piece of code you put on your website so Trustlytics can count your visits. Without this code your reports stay empty, because Trustlytics simply has no idea what is happening on your website.

The good news: you only install the code once. After that it runs on its own, in the background, without your visitors noticing a thing.

Prefer to watch or read it yourself? Your call:

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

Step-by-step guide

Where to find the tracking code

In the top menu bar, click " (Settings)".

Where to find the tracking code - Step 1 - Trustlytics

The Settings menu opens on the left. Choose "Tracking code".

Where to find the tracking code - Step 2 - Trustlytics

The Tracking code page opens.

Where to find the tracking code - Step 3 - Trustlytics

What you see on the page

The page is deliberately kept lean. You will find:

  • A short explanation.
  • A dark code box with your personal tracking code. The code is already tailored to your website. You do not have to change anything, add anything, or adjust anything.
  • The "Copy" button at the top right of the box.
Use the button, not your mouse. One click on "Copy" puts the complete code on your clipboard. Selecting it by hand, and a character is quickly lost, and then Trustlytics counts nothing at all. The button is the safe route.

 <!-- Trustlytics -->
<script defer data-domain="example.com" src="https://app.trustlytics.ch/tl.js"></script>
<!-- End Trustlytics Code -->

Tracking code - Trustlytics

Need help installing it?

Code copied, but not sure exactly where it goes on your website? We have written a separate guide for every common piece of software:

Your software not on the list? No problem. The route through Add the tracking code to an HTML document works in any system that gives you access to the source code. And drop us a line about which software you use. As soon as enough customers report the same system, we will write a guide for it.

Good to know

The tracking code only counts visits. It has no access to your Trustlytics account, no passwords, and no personal data about your visitors.

So nobody outside can skew your statistics, Trustlytics checks two things on every visit it counts:

Check What is behind it
The address has to match. The code contains your website address. Only when the page it runs on actually belongs to that address does anything get counted. If someone puts your code on a different site, nothing is recorded.
The address has to be registered with Trustlytics. It only counts for the website you entered in your account.
No reason to worry that your code is public: the tracking code necessarily sits in the source of your website and is therefore visible to anyone. That is the case with every website statistic and completely normal. Because the code only counts and can do nothing else, it is not a security risk for your account or your visitors.

Common questions

Do I have to change anything in the code?
No. It is already tailored to your website. Copy, install, done. Do not change anything about it, or it may stop working.

Do my visitors need a cookie banner now?
No. Trustlytics works without cookies. That is exactly why your visitors do not have to click anything away, and you do not need to collect consent for the measurement.

Will my website get slower because of it?
No. The script is tiny and loads in the background without holding up the rest of your page. It measures speed, it does not cost any.

I installed the code but do not see any visits. What is going on?
Check three things: was the change actually saved and published on your website? Is the code in the right spot? And did you wait a few minutes? The fastest way to see it is the Real-time report: open your own website in another window, and an entry should show up there within a few seconds.

Do I have to reinstall the code after rebuilding my website?
Only if it got lost in the process, for instance, when switching designs or systems. Afterward, take a quick look at the Real-time report to see whether counting is still happening. Your website address stays the same, so the code stays the same too.

Can I use the same code on a second website?
No. The code belongs to exactly one website. For a second website, you need another subscription with its own tracking code.

My tracking code is visible to anyone in the source. Is that a problem?
No. That is the case with every website statistic, technically it cannot work any other way. The code can do exactly one thing: count visits. It does not open a door to your Trustlytics account and does not give away any data.

Can someone copy my code and skew my statistics?
No. On every visit, Trustlytics checks whether the page the code is running on actually belongs to your registered website address. If it runs anywhere else, nothing gets counted.

Was this article helpful?