Core concepts

The Contentsquare solution provides all indicators necessary to precisely analyze web user experience. It requires the setting up of the Contentsquare Tracking Tag to collect data.

This document will give you all required notions to understand the collection tool. You will also find all information on the way the library works, and indications on every available command to pass information on correctly.

Account and project identifier

Section titled Account and project identifier

Your subscription to a Contentsquare contract gives you access to a tag ID composed of 13 characters. Each ID is a tag instance for which are notably setup:

  • The authorized domains (and subdomains if authorized),
  • IP addresses to exclude from the collection,
  • The visitors inclusion percentage for every collected data.

A project ID corresponds to only one instance on this configuration.
Consequently, if you want different inclusion percentages following sections of the site, you will need several tag IDs, meaning that data will be aggregated in several accounts separated on the Contentsquare interface.

It is possible to associate several domains on a same account.

By default, a browsing session on a domain doesn’t continue on another domain. For example, a web user going from domain.com to otherdomain.com will be identified as a “site exit” on domain.com and identified as a “new visitor” on otherdomain.com.

This is because Contentsquare doesn’t use third-party cookies.

Activating Cross-domain analysis

Section titled Activating Cross-domain analysis

It is possible to configure the tag so that a session started on a domain stays alive on another one.
This is cross-domain tracking.

There are two possible implementations of cross-domain tracking:

  • iFrames hosted on customer domains
  • iFrame hosted on Contentsquare domain

iFrames hosted on customer domains

Section titled iFrames hosted on customer domains

The Tracking Tag will retrieve Contentsquare cookies on every domain configured for the project. It uses all iFrames to read cookies from the customer domains.

Example: Consider a project with 2 domains weballwin.com and weballwin.net.

When loaded on weballwin.com, the Tag opens an iFrame on csxd.weballwin.net. This specific csxd.sub-domain redirects the browser to an HTML page served by Contentsquare which allows to read Contentsquare’s cookie on weballwin.net.
The Tag uses the most up-to-date cookies, from weballwin.com or weballwin.net, and which contain session data.

Setup: Every domain’s csxd.* subdomain must be redirected to Contentsquare servers with a DNS entry, and associated with an SSL certificate. If using foreign SSL certificates isn’t allowed by your IT Policy, a self-hosted alternative can be set up.

iFrame hosted on Contentsquare domain

Section titled iFrame hosted on Contentsquare domain

The Tracking Tag will to read and write a copy of its cookies on a Contentsquare domain using a single iFrame.

Example: Consider a project with 2 domains weballwin.com and weballwin.net.

When loaded on weballwin.com, the Tag opens an iFrame on contentsquare.net to read cookies present for this project; if cookies are present, the Tag uses the most up-to-date cookies, from weballwin.com or weballwin.net, and which contain session data. The Tag then writes new, up-to-date cookies on contentsquare.net.

This approach does not require any setup from your part.

If you are using different Contentsquare accounts for the same main domain, you may encounter this behavior:

  • A visitor enters a part of the domain tracked by an account.
  • The same visitor navigates to a part of the domain tracked by another account.

As Contentsquare doesn’t use third-party cookies, going back and forth between accounts may alter data accuracy. Some transactions may be collected on the wrong account for instance.

If your site hosts multiple versions of the same content under a single domain, you can either choose to assign a separate tag to each different country or to bundle them all together under one single tag.

This approach will allow you to split the analysis by country, making the Contentsquare account configuration quicker.

We advise to follow this path if there are separate teams working on separate countries/sections that don’t need to compare cross-country data.

This approach will allow you to tag the whole site with just one tag id, making the Contentsquare implementation quicker.

However, when configuring the Contentsquare account you will need to separate the different sites and create ad-hoc segments in order to analyze each different site/country.

A pageview is a pagevisit by a web user (sometimes called “hit” or “pagehit” ). It includes, among other things, the current URL of the page, the screen size, the window size and the size of the document. It is sent automatically.

Detailed information here…

When a web user is included in the analysis, pageviews are sent:

  • When the main tag is called, meaning every time a page fully loads (“full reload”) but not during Ajax loading,
  • The trackPageview command is called,
  • From every frame loading the tag if the iFrameTracking tag has been activated by Contentsquare and the trackPageview command is called within the iFrame.

Learn more about the population included in the analysis…
Learn more about sending pageviews…

To link a web user’s visit with their potential purchases, meaning the corresponding revenue, it is necessary to send the transaction via a dedicated command which includes, among other things, the reference of the purchase, its amount, which articles were bought, etc.

Learn more about transaction sending…

When the main tag is loaded, our solution will collect and transmit most interactions happening on the page: mouseovers and clicks will thus be processed to give you UX indicators on the elements composing the page.
Only the population included in the analysis is studied. Note that the tag itself does not collect nominative information on visitors.

Learn more about the included population in the analysis…
Learn more about collected data…

In addition to information automatically integrated in pageviews, it is possible to add data which will ease websites mapping and segmentation. To do so, you can add up to 20 personalized variables (“custom vars”) which will be sent along with pageviews.

Learn more about sending custom vars…

Dynamic vars are additional information on the session that can be used to segment users like A/B Test variations displayed to the current user. It can be fired at any point in time up to 40 per pageview.

Learn more about sending dynamic vars…

A page event or a custom page event is a value (an element or an event) triggered during a session on a specific page. Each page event is unique. They are created to answer a client request, thus they are very varied.

Learn more about sending custom page events…

Page events vs Custom Vars vs Dynamic Vars

Section titled Page events vs Custom Vars vs Dynamic Vars
Custom VarsDynamic VarsPage events
Fired at pageviewFired at any point in timeFired at any point in time
Up to 20 Custom Vars per pageviewUp to 40 Dynamic Vars per pageviewUp to 40 page events per pageview
Keys of 512 chars. max and values of 255 chars. maxKey of 50 chars. max and values of 255 chars. maxString, values of 255 chars. max
  • Custom Vars are used for page template/category.
  • Dynamic Vars are commonly used for A/B testing.
  • Page events are used to trigger ETR (example: VoC form submission) and Custom Visitor Identification (example: Customer ID or Order number)