All Collections
Website Tracking
About the Tracking Script
About the Tracking Script
Rikke Søndergaard avatar
Written by Rikke Søndergaard
Updated over a week ago

About the Tracking Script

Use the Tracking Script to collect browser data from your website visitors who have accepted marketing cookies.


In this Article


What is the Tracking Script

The Tracking Script is a piece of code that allows your website to feed data into APSIS One.

Install the the Tracking Script in the Head section in your website to collect browser data from website visitors who have accepted marketing cookies.

Locate the Tracking Script in the Section you are working in. Head over to Settings by clicking your Profile Icon. Choose the Section and go to the Tracking Script tab to the right.

Head over here for a guide on how to install the Tracking Script.


What Data can the Tracking Script Collect

By installing the Tracking Script in your website, you will be collecting visitor browsing data into Profiles. Here's some valuable information regarding the actual script, details about data collection.

Tracking Script Sample

Here's a sample of a typical APSIS One Tracking Script:

<script type='text/javascript'>
(function (d) {
var a1 = d.createElement('script'), fs;
a1.type = 'text/javascript';
a1.charset = 'UTF-8';
a1.async = true;
a1.src = 'https://static.ws.apsis.one/live/p/1297/29d2dec3.js';
fs = d.getElementsByTagName('script')[0];fs.parentNode.insertBefore
(a1, fs);
})(document);
</script>

Tracked Data

The data collected is stored in 2 places: in visitors browsers and in our cloud. All Events are tracked with a timestamp.

While installing the Tracking Script you can configure the tracking to collect some or all or some of the options below.

Page views

Site searches

  • The search term used by the visitor.

  • URL of page viewed/shown.

Google Analytics

  • UTM parameters present in URL of the page viewed/shown.

Google SEO/SEM

  • Whether the visitors page view originated from an organic or paid source.

Facebook Ads Referral

  • The domain associated with the ad.

  • URL of page viewed/shown.

  • Type of data source, in this case it will show as "ads".

File Downloads

  • The domain where the file is hosted.

  • URL of page where the file was downloaded.

  • Link to the file and its link title.

Product Views

  • Name of the product viewed/shown.

  • Name of the product category that the product viewed/shown belongs to.

  • Price of the product viewed/shown.

  • Image of the product viewed/shown.

  • Any other data that corresponds with elements mapped with the Product views activity.

Sign-up bar

  • Sign-up bar is viewed/shown on website.

  • A value is submitted (email address, phone number).

  • Click on return offer (CTA that appears after visitor has already sent value).

All above Events include:

  • A unique activity ID for the Sign-up bar. A website may have more than one active Sign-up bar.

  • The web domain the Sign-up bar is active on.

  • The URL where the Sign-up bar is displayed on.

  • Referrer page: the webpage the visitor came from, before arriving to the page where the Sign-up bar is displayed.

Cookie banner

  • The cookie banner is viewed/shown on website.

  • Cookie consent is submitted.

All above Events include:

  • A unique activity ID for the cookie banner. A website may have more than one active cookie banners, by using the advanced Match cookie/Language option.

  • The web domain the cookie banner is active on.

  • The URL where the cookie banner is displayed on.

  • Referrer page: the webpage the visitor came from, before arriving to the page where the cookie banner is displayed.


Cookies

All cookies are set by the JavaScript code on your domain, which means all cookies tracked with the Tracking Script are first-party cookies.

Here's the cookies the Tracking Script collects according to storage:

Cloud storage

  • Ely_vID: Profile ID.

  • ely_cc_answ: Cookie consent.

  • elytil: Whether the visitor is a first time visitor or not. Appears only once per Profile.

  • elytis: Whether it's a new browser session. Appears once per browser session.

  • cookie-banner-session, capture-bar-session-<hash>: Cookies that help monitor the status of Sign-up bar and Cookie banner activities.

Local storage

  • apsis-cookie-banner-variable: Shows the correct status of the Cookie banner.

  • pcdc: The service structure for the Events being sent to Audience.

Temporary cookies

  • apsis-cookie-test: APSIS One generates one temporary cookie per page in order to check whether the tracking script is able to store cookies on the visitor's browser. The test cookie will be deleted immediately after.


Tracking Script Specifications

Here's an overview of all the features, limitations and specifications of the Tracking Script.


The Tracking Script loads asynchronously (operates independently, and does not depend on other applications) with an average of 50-60ms loading time, and it will not affect the performance of your website.


Please consider that if your domain is protected and can only be accessed with a specific link or by using a VPN, password or any other credentials, APSIS One will not be able to display your domain's status. However, the Tracking Script will still be able to collect data.


Make sure to install the Tracking Script in the head section of your website for optimal performance.


Is your website built as a Single Page Application? (SPA) If yes, make sure that the history.pushState() method is implemented, and is adding a state to the browser's session history stack. The URL change is optional. This method allows the Tracking Script to log Events like Page View into APSIS One Profiles when they browse your website. Read more in Mozilla Web Docs.


The Tracking Script is hosted on a CDN provided by Apsis, which means it's a third party script.


If you have configured and enabled a Content Security Policy (CSP) for your page, make sure to add *.ws.apsis.one in the Europe and *.ws-apac.apsis.one in in the APAC to the list of trusted providers.

The requirements for the Tracking Script to properly perform are:

  • JavaScript.

  • LocalStorage.

  • Cookies.

  • Internet connection.


What's Next?

Did this answer your question?