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

Add the tracking code in Weebly

Weebly hides the spot for custom code somewhere you would never think to look: in the SEO settings. You enter the Trustlytics code there one single time, and after that every page of your website is measured. Including the ones you create later. Plan on about five minutes.

Two things decide whether this goes smoothly or turns into frustration. The code has to go into the "Header Code" field, not into the Footer Code. And you have to publish your website afterward. In Weebly, saving alone is not enough.

Watch or read. Your call:

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".
  • Access to your Weebly account and the right to edit and publish the website.
  • A few quiet minutes. The path runs through several menus. Anyone who quits halfway through tends not to find the spot again right away next time.
Weebly or Square Online? Weebly belongs to Square. If your account was moved over to Square Online, your interface looks different, and there is no SEO area with header code. The path there is a different one but just as short. In the Square Dashboard, click "Channels" and "Square Online", then "Settings" and "Tracking Tools". Click "Add new code", enter Trustlytics as the name, paste the code into the field below, choose "head" as the placement, and save. Then publish the website. The rest of this guide applies to the classic Weebly editor.

Edit site

Sign in to Weebly. Click "Edit site" in the top right.

If you have several projects in your account, take a close look at the name here. The code only takes effect on the website you picked.

Add the Tracking Code in Weebly: Editing your website - Trustlytics

SEO settings

You are now in the editor, and you see your website. Click "Settings" in the top menu.

Then click "SEO" in the menu on the left edge.

Do not let the name throw you. SEO stands for search engine optimization, and that has little to do with your measurement. Weebly filed the fields for custom code there anyway, because classic tracking codes have historically always ended up in that spot. So you are in the right place.
Add the Tracking Code in Weebly: Settings - Trustlytics
Add the Tracking Code in Weebly: SEO - Trustlytics

Pasting in the tracking code

Scroll down in the main window until you see two large text fields: "Footer Code" and, below it, "Header Code".

Click into the "Header Code" field and paste your tracking code. If there is other code in there already, leave it alone and simply add yours underneath. Several codes side by side are not a problem, as long as each one is complete on its own.

Use the Copy button in your Trustlytics account. Selecting it by hand loses a character fast, and then Trustlytics counts nothing at all.
Add the Tracking Code in Weebly: Header Code - Trustlytics
Add the Tracking Code in Weebly: Pasting in the tracking code - Trustlytics

Saving

Click "Save". That is how Weebly remembers your entry.

Do not leave the settings without saving. Anyone who just closes the window will find the field empty the next time around and then goes looking for the mistake somewhere completely different.

Add the Tracking Code in Weebly: Saving - Trustlytics

Publishing

Now comes the step almost everybody forgets. Click "Publish" in the top right.

Saved is not live. Weebly works with two versions of your website: the one you are editing and the one your visitors see. As long as you do not publish, the old version without the tracking code stays online. Trustlytics then stays empty, even though everything looks correct in the editor.

Once you publish, the code is active on all pages. You do not have to repeat it for every new page.

Add the Tracking Code in Weebly: Publishing - 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.

Do not test in the editor. Custom code does not run in the editing view or in the preview. Only the published website shows you whether it really works.

When nothing gets counted

Five causes cover almost every case:

Cause What to do
Not published By far the most common case. Back into the editor, click "Publish" in the top right.
Code in the footer Open Settings and SEO. If your code is in the "Footer Code" field, cut it, put it into "Header Code", save and publish again.
Not saved Field empty when you open it again? Then the entry was lost. Paste the code once more, save, and publish.
Only tested the preview Open your website at its proper address in the browser, not through the editor
Wrong address registered The code only works on the website listed in your Trustlytics account. Check that under Website. With Weebly, this is often a mix-up between your own domain and the weebly.com address.

Common questions

Do I have to paste the code into every page individually?
No. The "Header Code" from the SEO settings applies to your entire website. New pages and new blog posts are included automatically as soon as you publish.

Individual pages have a header code field too. Should I use that?
Not for Trustlytics. That field belongs only to the one page it sits on. You would have to repeat it everywhere and remember it for every new page. Through the SEO settings, you handle it exactly once.

Why of all places is the code under "SEO"?
It grew that way over the years. Weebly filed the fields for third party scripts there because back then almost nothing but Google codes ended up in them. Your measurement has nothing to do with search engine optimization.

"Header Code" or "Footer Code", what is the difference?
The "Header Code" loads before the page content, and the "Footer Code" only after. On short visits, the footer simply comes too late. That is why it goes in the header.

I cannot find the fields. What is going on?
Scroll down far enough in the SEO area, the code fields sit below the entries for title and description. If the SEO area is missing entirely, you are probably already working with Square Online. There you will find the spot under "Settings" and "Tracking Tools", with a click on "Add new code". The placement matters there too, choose "head", not "End of body".

Can I remove the code later?
Yes. Choose "Settings", then "SEO", delete the Trustlytics section from the "Header Code" field, and save and publish. From then on, nothing is measured anymore.

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.

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

Was this article helpful?