Cxense Destination

This destination is currently in beta. If you are interested in joining, let us know!

Segment makes it easy to send your data to Cxense (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Cxense in the format they understand.

Getting Started

Currently this destination supports events originating from Web sources (not Server or Mobile). You can read more about how define a source here.

To get started with Cxense and Segment, you’ll need the following:

  1. An existing account with Cxense.
  2. A data source integrated with Segment’s Javascript SDK (Analytics.js).
  3. Your Cxense Site Id.

Assuming these criteria are met, you can add Cxense as a destination for your desired source in your Segment account.


Tracking pageviews is a key component of Cxense’s offering. We integrate with this capability via our .page() method. When you trigger a .page() event the integration will invoke Cxense’s corresponding sendPageView functionality. We will also pass along any custom properties you define. Here is an example:'My Page Name', { author: 'Chris Nixon' });

The above .page() event would result in the following Cxense functionality:

window.cX.callQueue.push(['setCustomParameters', { author: 'Chris Nixon' }]);

Geography API

By default, Cxense captures location information about a user via their IP address. Their API, however, also offers the ability to explicitly define a location. If you would like to leverage this functionality, please adhere to our spec and pass location.latitude and location.longitude as properties of the context argument of your .page() events.


By default, Cxense provides basic anonymous user identity management but it also allows events to be associated with a custom user identifier. Our identify() method is used to integrate with this through the use of Cxense’s addExternalId method. Two things to note:

  1. In order to use this functionality, you must have a customer prefix registered with Cxense and defined as an integration setting.
  2. The User Id you are using with Segment .identify() events must be less than 40 characters. This is a limit enfored by Cxense’s API.
  3. The User Id will be sent to Cxense with the subsequent .page() event the user triggers.

Here is an example:


The above .identify() event would map to the following Cxense functionality:

window.cX.callQueue.push(['addExternalId', {
  id: 'userId'

Note: This will not happen until the next time a .page() event is triggered.


Customers using the Cxense DMP product are able to define and capture custom user events. We integrate with this functionality via our .track() method.

In order to use this functionality, you will need to have:

  1. A Cxense Persisted Query Id (for all the events you would like to track).
  2. A Cxense Origin identifier.
  3. A Cxense Customer Prefix.

These all need to be defined as integration settings. If you are unsure about any of these, please contact your Cxense representative to obtain them.

Once these settings are defined, we will begin mapping your .track() events to Cxense’s API. Here’s an example:

analytics.track('Shared Article', {
    title: 'How to View a Solar Eclipse Without Damaging Your Eyes'

The above .track() event would result in the following Cxense functionality:

window.cX.callQueue.push(['setEventAttributes', {

window.cX.callQueue.push(['sendEvent', 'Shared Article', {
    title: 'How to View a Solar Eclipse Without Damaging Your Eyes'

Supported Sources and Connection Modes

📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.


Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

Customer Prefix

Maintained by Cxense a so called ‘customer prefix’ can be configured on site-group level provided that the prefix string is available and permitted to use on the customerId you belong to. It is a three character lower-case alpha-numeric string, like ‘xyz’, ‘cxn’ or ‘cx2’. Ask your Cxense Onboarding or Support contact about your customer prefix


The Cxense origin for events from this Segment source. Differentiates various DMP applications used by the customer

Persisted Query Id

The Cxense Persisted Query Id for events from this Segment source

Add External Id

If enabled, we will set the user Id passed in Segment identify calls as an external Id for the user in Cxense

Site Id

Your Cxense site identifier

Questions? Need help? Contact us!
Can we improve this doc?
Email us:!