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

Add the tracking code in WordPress

For WordPress we have our own plugin. You install it from the WordPress directory, paste in your tracking code, and save. That is it. No theme files, no code in the source, no risk of everything disappearing with the next update.

Figure on about three minutes. After that, Trustlytics counts every page of your website, including the ones you create later.

How do you prefer to learn?

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

Step-by-step guide

What you need for this

  • Your tracking code. You get it under Tracking code with one click on "Copy".
  • Administrator rights in WordPress.Without them you cannot install plugins.
Why a plugin and not the theme file? Anyone who writes the code straight into the theme loses it with the next theme update. No warning, no error message. Your reports simply stop, and you might not notice for weeks. With the plugin, that does not happen.

Signing in and installing the plugin

  1. Sign in to your WordPress admin area.
  2. In the menu on the left, click "Plugins", then "Add Plugin".
  3. Type Trustlytics into the search field at the top right.
  4. On the plugin "Trustlytics Analytics" click "Install Now".

The installation takes a few seconds. The button then switches to "Activate".

Add the tracking code in WordPress: Signing in - Trustlytics
Add the tracking code in WordPress: Installing the Trustlytics plugin - Trustlytics

Activating the plugin

Click "Activate". Only then does the plugin go live, before that, it is just sitting on your server.

Almost everyone misses this step once. Installed does not mean active. When in doubt, check under "Plugins" whether Trustlytics shows up as activated there
Add the tracking code in WordPress: Activating the Trustlytics plugin - Trustlytics
Add the tracking code in WordPress: Checking the Trustlytics plugin - Trustlytics

Pasting in the tracking code

  1. In the menu on the left, click "Trustlytics". The entry is new since you activated it.
  2. Paste your tracking code into the text field.
  3. Click "Save Changes".

Done. From now on the code runs on every page of your website, all by itself. Including on pages you create next week.

Use the copy button in Trustlytics. Selecting it by hand, and a character is quickly lost, and then nothing gets counted at all. The button puts the complete code on your clipboard.
Add the tracking code in WordPress: Switching to Trustlytics - Trustlytics
Add the tracking code in WordPress: Pasting in the tracking code - Trustlytics
Add the tracking code in WordPress: Saving changes - Trustlytics
Add the tracking code in WordPress: Confirmation - Trustlytics

Checking the status

After saving, the plugin shows you where you stand at the top of the page:

Display What it means
🟢 Active Everything is in place. Next to it, you see which domain the tracking is running for.
⚪ Inactive No code has been saved yet. Paste it into the field below.

Add the tracking code in WordPress: Checking the status - Trustlytics

Checking

The status in the plugin tells you the code is saved. Whether it is actually counting on your website, you see in Trustlytics itself:

  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.

When nothing gets counted

Five causes cover almost every case:

Cause What to do
Caching plugin The most common case with WordPress. Your caching plugin is still serving the old version of the page. Clear the cache, usually through a button in the top bar or in the plugin settings.
Plugin not activated Installed is not activated. Check under "Plugins" whether Trustlytics shows up as active there.
Status says "Inactive" Then no code is saved. Paste it in and click "Save Changes".
Wrong domain in the status Does it show an address other than yours? Then you pasted in the code from a different account. Get it again from your Trustlytics account.
Wrong address registered The code only works on the website listed in your Trustlytics account. Check that under Website.

Common questions

Does the plugin cost anything?
No. The plugin is free and available in the official WordPress directory. All you need is a Trustlytics account so you have a tracking code.

Do I have to paste the code into every page individually?
No. That is exactly the point of the plugin. One entry is enough, and the code then appears on every page. Including the ones you create later.

Does the code survive a theme update?
Yes. That is precisely why the plugin exists. The code does not sit in the theme, it sits in the plugin, and a theme update does not touch it.

What happens if I deactivate the plugin?
Then the code is no longer included, and Trustlytics stops counting new visits. Your numbers so far stay in Trustlytics. Activate the plugin again, and counting picks up where it left off.

Does the plugin itself send data to Trustlytics?
No. All the plugin does is insert the tracking code into your pages. The counting after that is done by the code itself, and it only counts visits. No accounts, no passwords, and no personal data about your visitors.

Will my website get slower because of it?
No. The plugin itself does almost nothing, and 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.

I cannot find the plugin in the search. What is going on?
Type the name out in full and watch the spelling: Trustlytics. If it still does not show up, you may not have the rights to install plugins. In that case, get in touch with an administrator for your website.

I changed my website address. Now what?
Then your tracking code changes too. Get the new one from your Trustlytics account and replace it in the plugin. Without that step, Trustlytics stops counting new visits.

Was this article helpful?