Install the tracking code
Open your project in the Project Manager and choose Installation Guide in its menu. The displayed steps match this project's tracking mode, banner choice and crawler setting.
Copy your tracking code
- Use Copy code under Add the Tracking Code for Visitor Tracking.
- Add the code to the
<head>of every page you want to track, immediately before</head>. With a shared website template, add it where the head for those pages is generated. - Save or publish the change in your website system and reload an affected page.
The loader contains your project ID in the data-ti-id attribute. Use your own project's code and install it once per page. A second installation through a plugin or another template is unnecessary.
Loading the script only in the footer can mean that very short visits or quick page changes are not fully recorded.
Install additional files
If Install Required Files is shown, download the package provided there. Depending on your settings, it contains the TrafficInsight banner, crawler tracking or both.
Extract it and copy the complete trafficinsight directory to your website's root directory. The paths shown in the manager expect the files to be available there. If this download step is absent, your current configuration does not require these additional files.
Connect your cookie banner
TrafficInsight cookie banner
For this option, the manager provides CSS and JavaScript to initialise the banner. Add these snippets at the indicated locations as well. In particular, change the privacy-policy link to match your website.
Existing cookie banner
Connect its saved and newly made decisions to the two signals described in Anonymous & Consent Mode.
A Consent project waits for a known decision before starting regular tracking. An Anonymous project starts anonymous collection directly. Choosing an external banner in the manager does not itself connect that banner.
Install crawler tracking
When crawler tracking is enabled, the manager also shows Add Tracking Code for Crawlers and Search Engine Bots.
Install the provided files and add the displayed PHP code to the PHP pages you want to track, ideally at the location near the end of the file indicated by the manager. The code uses the trafficinsight directory in your website's root, including from PHP files in subdirectories.
Your web server must execute PHP for these pages. Installing only the JavaScript tracker or uploading the PHP file does not enable crawler tracking on the other pages.
Check the installation
Test a visitor request
- Check that the project is active. Not yet activated, Tracking paused and Offline projects do not record new traffic.
- Visit a normal page on your website where tracking is installed.
- For a Consent project, grant consent in the banner and visit another page afterwards. The saved decision must be available there again.
- Return to Installation Guide → Test functionality and choose Check installation or Check installation again.
- Open the app for the same project, choose Today in the project time zone and check page views under Content. Use the refresh button to reload the values.
A success message in the manager confirms that traffic has already been recorded. It is not a complete test of all pages, your banner or individual goals. Also check the specific page in the app. Another page load within the same session does not necessarily produce a new session start.
Test crawlers separately
If you use crawler tracking, also choose Start bot detection. The manager performs a controlled request and checks for a crawl entry within the last five minutes. If it fails, first check the files, PHP installation and website availability. A successful visitor test does not replace this check.
Handle error pages
Recognised 404 pages are not tracked. If the browser does not reliably expose the HTTP status, omit the tracker from the error-page template or place this marker before the tracker there:
<meta name="trafficinsight-status" content="404">Use the marker only on the error page. Adding it to a shared head for normal pages would also prevent tracking those pages. The PHP crawler integration uses the server-side HTTP status; it does not read this HTML marker.
If expected data is missing, follow the troubleshooting guide.