In order for Trackboxx to reliably record visitors, the Tracking script be integrated into your website. The integration is a one-time process – after that, all page views are automatically recorded.
Where should the tracking script go?
The script must be in the Header of your website be placed, i.e. between and .
Only there can it be ensured that all subpages included become.
Obtain your personal tracking code
After that, a pop-up will appear with your individual tracking code.
- Log in to the Trackboxx dashboard.
- Create a new web page (name + URL).
- After that, a pop-up will appear with your individual tracking code.
The code looks like this, for example (example!):
<script>
(function(d, s, id, w, f){
w[f] = w[f] || function() {
(w[f].q = w[f].q || []).push(arguments)
};
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)){ return; }
js = d.createElement(s); js.id = id;
js.onload = function(){
// remote script has loaded
};
js.async = true;
js.src = "https://cdn.trackboxx.info/p/tracker.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', trackboxx-script', window, trackboxx'));
trackboxx('set', siteId', 'TB-66377283');
trackboxx(trackPageview');
</script>Code language: HTML, XML (xml)
Important! This is a sample code. You will get your personal code in your dashboard when you click Add Page.
After the code has been integrated into your website, the visitors to your site will be recorded.
Integrating tracking scripts into WordPress
In WordPress, there are various ways to integrate the code into the header. Which method you use depends on your setup, your theme and your technical knowledge.
1. Header.php (manual integration)
You can enter the code directly into the header.php Insert your theme.
Important: Use a Child Theme, otherwise the code will be overwritten during the next update.
2. Code fields in theme settings
Many modern themes offer their own fields for placing code in the header – e.g. in the theme options or in the customiser.
Typical for many page builder themes such as Avada, Divi or Enfold.
3. Hooks / Theme-specific integrations
Some themes and frameworks offer Hook systems, which allows code to be neatly inserted into the header – often without having to edit a file directly.
Use the documentation for your theme here.
4. Integration via plugins
There are numerous plugins that are specifically designed for this purpose., Tracking or header scripts to integrate.
Simply search for:
„WordPress Header Script Plugin“ or „WordPress Tracking Script Plugin“.
Especially when you E-commerce tracking (e.g. WooCommerce), we recommend using a plugin, as additional configurations are required here.
