Skip to main content

Tracking script

Find and copy the Section's Tracking Script — the snippet you install on your website to capture visitor behaviour

Tracking script

The Tracking Script is a small piece of JavaScript that you install on your website. Once installed, it captures browsing data — page views, clicks, custom events — from visitors who have accepted your marketing cookies, and feeds that data into the Profiles in your Section's Audience.

This article shows you where to find your Section's script in Account settings. For the deeper details on how the script works, what it captures, and how to install it correctly, see the Website Tracking collection.

💡 Each Section has its own Tracking Script

Tracking Scripts are per Section, not account-wide. Each Section has a unique script, and the Domains list in that Section determines which websites it's allowed to track. Don't reuse a script from one Section on another Section's website — visitor data will land in the wrong Section, and the domain status will show as Wrong Script.


In this article


What the Tracking Script does

Once installed and accepted by visitors via your cookie banner, the script:

  • Captures page views, clicks, and custom events from visitors who have given marketing-cookie consent.

  • Adds the captured data to Profile records in the Section's Audience — both Known Profiles and Unknown Profiles (anonymous visitors identified only by cookie).

  • Powers the display of Cookie banners and Sign-up bars created in the Website tool.

  • Enriches your Audience over time, so you can segment and personalise based on actual browsing behaviour, not just static profile attributes.

⚠️Cookie consent is mandatory for tracking

Apsis only tracks visitors who explicitly accept the relevant cookies. No cookie consent = no tracking data, regardless of whether the script is installed. Your cookie banner setup matters as much as the script itself.


Before you start

  • You need Account Owner or Admin User rights to access Account settings.

  • The Section must already have at least one verified Domain — see Domains.

  • If your domain is multilingual, set up Languages first — see Languages.

  • Access (or coordination with someone who has access) to your website's HTML or tag manager — this is where the script will eventually be installed.


Locate the Tracking Script

  1. Click your Profile Icon in the top right corner and select Settings.

  2. Open the Section the script belongs to.

  3. In the inner left menu, go to Tracking Script.

This is where you'll find the script for your Section. Copy it and paste it into the <head> section of every page on your website — or, more commonly, install it once via your tag manager (Google Tag Manager, Tealium, Adobe Launch).

✅ Use a tag manager when you can

Installing the script directly in your site's HTML works, but a tag manager is much easier to maintain — especially if your developers and marketing team don't share a release cadence. Add the script as a custom HTML tag triggered on All Pages, and you're done.

For full installation guidance — including how to connect your own cookie banner — see the dedicated Website Tracking collection.


Multilingual sites: tracking per Language

If your domain has multiple Languages set up, the Add Tracking option appears per Language — not for the domain as a whole. You'll need to configure tracking separately for each language version of your site.

💡 Why per-language tracking matters

Tracking events are tagged with the Language they came from, which lets you segment and report by language audience. Without per-language tracking, all visitors get bundled together and you lose the ability to target a specific language version with Website tool activities.

See Languages for the full per-language setup, and the Website Tracking collection for what each tracking option captures.


Tracking script verification and Advanced Settings

Below the script itself, you'll find two extra controls.

Tracking script verification

Tracking script verification lets you confirm the script is working by entering a Cookie ID — useful for spot-checking after installation, or when troubleshooting why a specific Profile isn't getting tracking events. Paste the Cookie ID from a test visitor's browser into the field and click Search; if the script is set up properly, the matching Profile appears. If not you get "Profile Not Found".

Advanced Settings — Run Tracking Script Independently

Advanced Settings → Run Tracking Script Independently bypasses cookie consent — Apsis will collect data as soon as the script loads on your website, regardless of whether the visitor has accepted marketing cookies. Only enable this if you have a legal basis for tracking without explicit consent (for example, if your privacy framework treats tracking as a legitimate interest, or you're in a jurisdiction where consent isn't required). For most setups under GDPR, leave this off and rely on the cookie banner.

There are more settings available where you can define specific cookies to load the tracking script. These will be available as soon as you toggle the setting for Run Tracking Script Independently,

🚨 Don't enable "Run Tracking Script Independently" without the extra settings unless you are sure it is the right choice for you. Bypassing consent is a meaningful legal decision, not a technical convenience. Get confirmation from your legal or compliance team before flipping this switch — under GDPR, tracking without valid consent can lead to regulatory action and fines. If in doubt, leave it off.


Troubleshooting

Issue

Likely cause

Fix

Domain status is "No Script"

The script isn't installed, or it's not on the page Apsis tries to read.

Verify the script is in the <head> on every page, especially the homepage. Test in an incognito window without ad-blockers.

Domain status is "Wrong Script"

You installed a script from a different Section.

Open the correct Section, navigate to Domains & Languages → Tracking Script, copy that script, and replace the one on your website.

Script is installed but no data is appearing in Profiles

Visitors haven't given cookie consent, or the cookie banner is blocking the script before consent.

Apsis only tracks visitors who accept marketing cookies. Verify your cookie banner correctly enables tracking after consent.

Tracking Script tab is empty or missing

Section has no verified Domain yet.

Add and verify at least one Domain first — the script becomes available once a Domain exists.

Multilingual domain only tracks one language

Tracking added for the whole domain instead of per language.

Set up Languages first, then add Tracking separately for each Language. See Languages.

Want to test if the script is working

After cookie consent, visit your domain and check the Domain status in Apsis (may take up to an hour to update). Or check browser DevTools → Network tab for requests to the Apsis tracking endpoint.


What's next?

  1. Website Tracking collection — Detailed guidance on the script itself, what it captures, how to install it, and how to connect a custom cookie banner.

  2. Cookie settings — Configure cookie life time and Person detection for the Section.

  3. Domains — Add and manage the websites tied to the Section.

  4. Languages — Multi-language setup for the Tracking Script and Website tool.

Did this answer your question?