Product Analytics

The following Product Analytics capabilities are available in WebViews only if you use the CSQ SDK.

If you are running the Contentsquare or Heap SDK, upgrade to the CSQ SDK first:

Link a user’s activity across all devices and sessions with a consistent internal identifier (like a User ID or hashed email), effectively moving beyond cookie restrictions. This creates a single, unified view of the customer journey, enabling deep cross-device analysis, enhanced segmentation based on known user attributes, and seamless audience activation by integrating behavioral data with external tools like your CRM.

The identify command associates the current user with a unique identifier you provide.

window._uxa.push(["identify", <identityString>, <options>]);

For example, you can identify users with:

  • A User ID from your CRM

    <script type="text/javascript">
    window._uxa = window._uxa || [];
    // crmUserID = 145612124
    window._uxa.push(["identify", crmUserID]);
    </script>
  • A hashed user email address

    <script type="text/javascript">
    window._uxa = window._uxa || [];
    // hashedEmail = bfuKr7A9WgrhAgm2:C2YFJWcfN1yXzUnPfMrv6JivXJvYw==
    window._uxa.push(["identify", hashedEmail]);
    </script>

Attach properties to users to allow contextual, cross-device, and cross-platform analysis such as finding users with the payment plan X in the past month. User properties can be attached to both anonymous and identified users.

<script type="text/javascript">
window._uxa = window._uxa || [];
// hashedEmail = bfuKr7A9WgrhAgm2:C2YFJWcfN1yXzUnPfMrv6JivXJvYw==
window._uxa.push(["identify", hashedEmail]);
// userProperties = { "accountType": "Premium", "membershipLevel": 3 }
window._uxa.push(["addUserProperties", userProperties]);
</script>

Resets the current session and generate a new user ID if the user has an identity string associated with them.

<script type="text/javascript">
window._uxa = window._uxa || [];
// user identity = 9fae2d84-37e7-4321-9b26-793d1665e887
window._uxa.push(["resetIdentity"]);
// new user identity = 4b5c6e21-2f4a-4c3d-8f1e-8b9d7e5c3a1f
</script>

Hierarchies identify an event’s origin within the current screen. They help understanding how users interact with different parts of your website, such as product categories, blog sections, or service pages.

Hierarchies are collected automatically within WebViews.

Considering the following component:

const PinView = (props) => {
return (
<View>
<Button title="1" rounded />
<Button title="2" rounded />
...
</View>
);
};

Tapping the button “1” would generate the hierarchy: PinView Button[title=1][rounded=true].

Target text is the automatic collection of text content of an element a user interacts with. It captures the actual text displayed within clickable elements like buttons, links, and similar UI components.

For example, if a user clicks on a button that says “Sign Up”, the Target Text property would capture “Sign Up” as the value.

This can be enabled in one of two ways:

  • Collect text of buttons or links: A button or a link text that users have or have not clicked on.
  • Collect text of all elements: Any element containing text that users have or have not clicked on (includes buttons and links).

This applies to tap, click, and submit events. Target text is collected up to 100 characters.