---
title: Product Analytics - Web
description: What to expect when Product Analytics is activated — the data collected, the Tag APIs available, and the cookies created
source_url:
  html: https://docs.contentsquare.com/en/web/product-analytics/
  md: https://docs.contentsquare.com/en/web/product-analytics/index.md
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

> **Note**
>
> Requires a [Product Analytics](https://contentsquare.com/platform/product-analytics/) plan, the [User Lifecycle Extension](https://support.contentsquare.com/hc/en-us/articles/37271864562961-Introduction-to-the-User-Lifecycle-extension), the [Data Connect](https://support.contentsquare.com/hc/en-us/articles/37271863730705-Get-started-with-Data-Connect) module, or enrollment in the **Contentsquare Experience Platform Early Access program**.

> **Heap tag users**
>
> This section is not applicable to Heap customers with the Heap tag. If you're using the Heap tag, refer to the [Heap Web tracking docs ↗](https://developers.heap.io/docs/web).

Product Analytics (PA) functionalities capture and visualize user interactions across web, mobile, and other platforms, providing insights into user behavior and engagement. This data helps you identify user preferences, pain points, and behavior patterns so you can improve and optimize the digital experience.

For more information, see [our product ↗](https://contentsquare.com/platform/product-analytics/) and [pricing ↗](https://contentsquare.com/pricing/) pages.

## PA cookies

When Product Analytics is activated, the following cookies are created in addition to the standard Tag cookies:

| Cookie | Duration | Description |
| - | - | - |
| [`_cs_s_ctx`](https://docs.contentsquare.com/en/web/cookies/#_cs_s_ctx) | 30 minutes | Stores session context data (first pageview time, URL, and referrer). |
| [`_cs_i`](https://docs.contentsquare.com/en/web/cookies/#_cs_i) | 3 days | Stores the encrypted user identity string set via the `identify` command. |
| [`_cs_ep`](https://docs.contentsquare.com/en/web/cookies/#_cs_ep) | 13 months | Stores visit-level custom event properties set via `customProperties:visit:add`. |

> **Note**
>
> Product Analytics also stores the current pageview URL in the [`_cs_cu`](https://docs.contentsquare.com/en/web/cookies/#_cs_cu) local storage item. It is not a cookie, so it does not belong in a cookie allowlist, but a Consent Management Platform or script that clears local storage will remove it.

### Server configuration

These cookies are **new** when Product Analytics is activated and are not present in a standard Tag deployment. If you have an existing cookie filter, update it before activating PA features.

If you enforce a cookie allowlist — through a Consent Management Platform (CMP), a WAF, or server-side filtering rules — add `_cs_s_ctx`, `_cs_i`, and `_cs_ep` to that list. Blocking any of them prevents Product Analytics from collecting data correctly.

`_cs_ep` grows with the number of custom event properties set. Combined with `_cs_s_ctx`, the total `Cookie` request header size can exceed limits enforced by reverse proxies or web servers. If your infrastructure enforces a header size limit, make sure it accommodates at least 4 KB for cookies.

For more information, see [Cookies](https://docs.contentsquare.com/en/web/cookies/#tag-cookies).

## Session context collection

Most PA reporting relies on **session-level context** — when a visit started and where it came from — being attached to every event, not just the first pageview. The Tag persists this context client-side in the [`_cs_s_ctx`](https://docs.contentsquare.com/en/web/cookies/#_cs_s_ctx) cookie and replays it as request parameters on each subsequent pageview and event:

| Stored value | Sent as | Purpose |
| - | - | - |
| `firstViewTime` | `fvt` | When the session started. |
| `firstViewUrl` | `fvurl` | The session's landing page. |
| `sessionReferrer` | `fpvurl` | The session's traffic source. |

This cookie is created **only** when Product Analytics is active on the project. It has no effect on Experience Analytics features such as Session Replay or heatmaps.

### Impact of blocking `_cs_s_ctx`

If `_cs_s_ctx` is blocked or stripped — by a WAF rule, a cookie allowlist, or a Consent Management Platform — the Tag cannot restore session context after the first pageview. Landing page, traffic source, and session-start time are then missing from every later event, which degrades attribution and the overall quality of PA reporting for the affected sessions.

To avoid this, add `_cs_s_ctx` to any cookie filter you enforce — see [Server configuration](https://docs.contentsquare.com/en/web/product-analytics/#server-configuration).

## Data collection

Activating Product Analytics does not change the data the Tag already collects for Experience Analytics — see [Collected data](https://docs.contentsquare.com/en/web/collected-data/). It adds the following data on top of it:

| Data | Description |
| - | - |
| Interaction events | `click`, `tap`, `change`, and `submit` interactions are collected as events, so they can be analyzed without prior tagging. |
| Element hierarchy | Each interaction event carries the chain of ancestor elements of the interacted element. See [Element hierarchy collection](https://docs.contentsquare.com/en/web/product-analytics/#element-hierarchy-collection). |
| Page title | The title of each pageview. You can exclude it with [`hidePageTitle`](https://docs.contentsquare.com/en/web/command-reference/#hidepagetitle). |
| Session context | Session start time, landing page, and traffic source, attached to every event. See [Session context collection](https://docs.contentsquare.com/en/web/product-analytics/#session-context-collection). |
| User identity | The identity string set via [`identify`](https://docs.contentsquare.com/en/web/command-reference/#identify), stored encrypted in the [`_cs_i`](https://docs.contentsquare.com/en/web/cookies/#_cs_i) cookie. |
| Custom properties | The user, event, and pageview properties you send through the Tag APIs. See [Data collection enrichment](https://docs.contentsquare.com/en/web/product-analytics/#data-collection-enrichment-tag-apis-for-pa). |

### Element hierarchy collection

To power interaction analysis, the Tag enriches `click`, `tap`, `change`, and `submit` events with the **element hierarchy**: the chain of ancestor elements from the interacted element up to the document root. Each level collects the tag name and a limited set of attributes.

Hierarchy collection respects your project's masking settings, and attributes that commonly hold sensitive or non-semantic data are never collected. For the serialization format, the size limits, and the full list of excluded attributes, see [Element hierarchy](https://docs.contentsquare.com/en/web/collected-data/#element-hierarchy).

## Data collection enrichment (Tag APIs for PA)

Activating Product Analytics unlocks the following groups of Tag commands. All PA commands are called through `window._uxa.push(...)`, the same interface used for standard Tag commands.

See [Command reference](https://docs.contentsquare.com/en/web/command-reference/) for full syntax and examples.

### Custom event commands

Product Analytics

Custom event commands let you send your own named events, enriched with custom properties, alongside the interactions Contentsquare captures automatically.

| Command | Description |
| - | - |
| [`trackEvent`](https://docs.contentsquare.com/en/web/command-reference/#trackevent) | Sends a custom event with a name and optional properties. |

### Event property commands

Product Analytics

Event property commands let you attach custom key-value properties to all subsequent events in the current visit.

| Command | Description |
| - | - |
| [`customProperties:visit:add`](https://docs.contentsquare.com/en/web/command-reference/#custompropertiesvisitadd) | Adds custom properties to all subsequent events. Alias: `addEventProperties`. |
| [`customProperties:visit:remove`](https://docs.contentsquare.com/en/web/command-reference/#custompropertiesvisitremove) | Removes a specific custom property from subsequent events. Alias: `removeEventProperty`. |
| [`customProperties:visit:clear`](https://docs.contentsquare.com/en/web/command-reference/#custompropertiesvisitclear) | Removes all custom properties from subsequent events. Alias: `clearEventProperties`. |

### Identity commands

Product Analytics

Identity commands let you attach a unique identifier to the current user for cross-device and cross-session analysis.

| Command | Description |
| - | - |
| [`identify`](https://docs.contentsquare.com/en/web/command-reference/#identify) | Associates the current user with the provided identity string. If a different identity is already set, the session is reset: the user ID is regenerated and a renewal pageview is sent. |
| [`resetIdentity`](https://docs.contentsquare.com/en/web/command-reference/#resetidentity) | Detaches the identity string from the current user and resets the session. |
| [`getIdentity`](https://docs.contentsquare.com/en/web/command-reference/#getidentity) | Returns whether the current user has an identity string associated with them. |

For more information on user identification, see [Track Users](https://docs.contentsquare.com/en/web/track-users/).

### User property commands

Product Analytics

User property commands let you attach custom key-value properties to the current user. These properties are associated with all future events for that user.

| Command | Description |
| - | - |
| [`addUserProperties`](https://docs.contentsquare.com/en/web/command-reference/#adduserproperties) | Attaches custom properties to the current user, overwriting any previously set values for the same properties. |

### Pageview property commands

Product Analytics

Pageview property commands let you attach custom key-value properties to the current pageview and all events on that page.

| Command | Description |
| - | - |
| [`customProperties:page:add`](https://docs.contentsquare.com/en/web/command-reference/#custompropertiespageadd) | Adds custom properties to the current pageview and its events. |
| [`customProperties:page:remove`](https://docs.contentsquare.com/en/web/command-reference/#custompropertiespageremove) | Removes a specific custom property from the current pageview. |
| [`customProperties:page:clear`](https://docs.contentsquare.com/en/web/command-reference/#custompropertiespageclear) | Clears all custom properties from the current pageview. |

## Privacy

Masking and encrypted elements defined in the Contentsquare tracking tag are also enforced for PA data collection. See [Personal Data Handling](https://docs.contentsquare.com/en/web/personal-data-handling/).

For projects with IP-less mode active, IP processing is also disabled for PA data collection.

### Page title masking

You can keep page titles out of PA collection with the following commands:

| Command | Description |
| - | - |
| [`hidePageTitle`](https://docs.contentsquare.com/en/web/command-reference/#hidepagetitle) | Replaces the page title with `****` in the next or all next pageviews. |
| [`resetHidePageTitle`](https://docs.contentsquare.com/en/web/command-reference/#resethidepagetitle) | Reverts `hidePageTitle` for the next pageviews. |

## CSP

If you enforce a Content Security Policy, see [Content Security Policy](https://docs.contentsquare.com/en/web/content-security-policy/) for the directives required by the Contentsquare Tag.

Collecting the data described on this page from your visitors needs no directives beyond those. The **Visual Labeler**, used to tag events from the Contentsquare app, loads its assets from an additional host and needs `'unsafe-eval'`. Those directives are listed under [Product Analytics](https://docs.contentsquare.com/en/web/content-security-policy/#product-analytics) on the Content Security Policy page.


```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"Product Analytics","description":"What to expect when Product Analytics is activated — the data collected, the Tag APIs available, and the cookies created","url":"https://docs.contentsquare.com/en/web/product-analytics/","inLanguage":"en","dateModified":"2026-10-02T16:39:51+02:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Contentsquare Technical Documentation","url":"https://docs.contentsquare.com/"}}
```