For the complete documentation index, see llms.txt.

Product Analytics

Product Analytics (PA) captures and visualizes 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 and pricing pages.

If you enforce a Content Security Policy, see Content Security Policy for the directives required by the Contentsquare Tag.

No additional CSP directives are required for the PA features described on this page.

Masking and encrypted elements defined in the Contentsquare tracking tag are also enforced for PA data collection. See Personal Data Handling.

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

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

CommandDescription
hidePageTitleReplaces the page title with **** in the next or all next pageviews.
resetHidePageTitleReverts hidePageTitle for the next pageviews.

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 for full syntax and examples.

Product Analytics

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

CommandDescription
trackEventSends a custom event with a name and optional properties.
Product Analytics

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

CommandDescription
identifyAssociates 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.
resetIdentityDetaches the identity string from the current user and resets the session.
getIdentityReturns whether the current user has an identity string associated with them.

For more information on user identification, see Track Users.

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.

CommandDescription
addUserPropertiesAttaches custom properties to the current user, overwriting any previously set values for the same properties.
Product Analytics

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

CommandDescription
customProperties:visit:addAdds custom properties to all subsequent events. Alias: addEventProperties.
customProperties:visit:removeRemoves a specific custom property from subsequent events. Alias: removeEventProperty.
customProperties:visit:clearRemoves all custom properties from subsequent events. Alias: clearEventProperties.
Product Analytics

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

CommandDescription
customProperties:page:addAdds custom properties to the current pageview and its events.
customProperties:page:removeRemoves a specific custom property from the current pageview.
customProperties:page:clearClears all custom properties from the current pageview.

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. Attributes that commonly hold sensitive or non-semantic data are never collected, including:

  • Password manager attributes (for example, 1Password's data-com.onepassword.iv).
  • Library attributes that can hold personal data (for example, data-initial-value from v-mask).
  • Inline scripts and styles (onclick, onsubmit, style).
  • Framework-internal attributes with no analytical value (for example, data-reactid).

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 cookie and replays it as request parameters on each subsequent pageview and event:

Stored valueSent asPurpose
firstViewTimefvtWhen the session started.
firstViewUrlfvurlThe session's landing page.
sessionReferrerfpvurlThe 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.

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 below.

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

CookieDurationDescription
_cs_s_ctx30 minutesStores session context data (first pageview time, URL, and referrer).
_cs_i3 daysStores the encrypted user identity string set via the identify command.
_cs_ep13 monthsStores visit-level custom event properties set via customProperties:visit:add.

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.