Trustlytics Support Center > Settings > Tracking-Code > How to insert the tracking code from Trustlytics into an HTML document

How to insert the tracking code from Trustlytics into an HTML document

At this point, we would like to show you how to integrate the tracking code from Trustlytics into your HTML document.



JavaScript Tracking code



Tracking using an image



JavaScript Tracking code

If you manually create your website with HTML, you have the option to easily insert the tracking code into your HTML document.



Use your preferred editor (e.g., Visual Studio Code, Adobe Dreamweaver, Sublime Text, Notepad++, Atom, etc.) to open the HTML document.



To simplify it, let's take a basic HTML document as an example. It consists of a header section (head) and a content section (body). Just like this example, your HTML document also has these two sections.



Navigate in your HTML document to the closing </head> tag.

Now take the JavaScript tracking code from Trustlytics, as described in the introduction, and insert it before the closing </head> tag.

Perform these two steps for each individual HTML document. It is recommended to insert the tracking code into all of your HTML documents so that Trustlytics can measure your website visitors.



Once the tracking code has been inserted in all places, you still need to publish your website. This is done in the usual way.



Congratulations! You have successfully integrated the tracking code from Trustlytics into your website. From now on, Trustlytics will measure the visitors to your website.




Tracking using an image

If you create your website manually with HTML, you have the option to easily insert the tracking code into your HTML document.



Use your preferred editor (e.g., Visual Studio Code, Adobe Dreamweaver, Sublime Text, Notepad++, Atom, etc.) to open the HTML document.



To simplify it, let's take a basic HTML document as an example. It consists of a header section (head) and a content section (body). Just like this example, your HTML document also has these two sections.



Navigate to the opening <body> tag in your HTML document.

Now take the tracking code using an image from Trustlytics, as described in the introduction, and insert it after the opening <body> tag.

Perform these two steps for each individual HTML document. It is recommended to insert the tracking code into all of your HTML documents so that Trustlytics can measure your website visitors.



Once the tracking code has been inserted in all places, you still need to publish your website. This is done in the usual way.



Congratulations! You have successfully integrated the tracking code from Trustlytics into your website. From now on, Trustlytics will measure the visitors to your website.