Tech docs
Integration Docs
Audience Segments

Audience Segments offers a few different ways to segment your audience in the dashboard, isolating a subset of users while also maintaining a view for your entire readership. There are two primary types of segments:

  1. Segments based on standard data - Standard data supports segmenting by geography (based on Geo IP lookups), campaigns (based on UTM or ITM parameters), or referring URL.
  2. Segments based on custom data - Commonly used to segment by subscription or registration status, but can be based on any method you choose to better understand your audience.

Depending on your plan, segment tracking may result in additional charges. Contact your account manager or for more information.

#Segments based on standard data

For geographic, campaign, or referrer segments, no integration changes are necessary. Simply contact your account manager or with the details of the segments you'd like to add.

#Segments based on custom data

Tracking subscription plans, registration status, or any other custom parameter requires a small change to your integration so that the additional information gets sent as part of each pageview request.

Here's an example of what custom segment tracking code might look like for a user that is subscribed to the "basic" plan:

window.PARSELY = window.PARSELY || {
  autotrack: false,
  onReady: function() {
      data: {
        plan: "basic"

<!-- START Include -->
<!-- ...insert the parsely tracker code here... -->
<!-- END Include -->


Any segmentation code must be placed before your standard Parsely tracking snippet.

In the example above, note that in the call to PARSELY.updateDefaults, we provide an object like this:

   data: {
      plan: "<name of plan>"

You must pass a data object that matches this shape. Within the data object, you can use whatever key/value strings best describe your business logic. For example, the following would also be valid:

   data: {
      user_type: "anonymous",
      content_type: "free"

In a real integration, the value of each data property will be set by your business logic. This means that any value you intend to use for segmentation must be available client-side by the time the tracker loads. It's also important to consistently handle null values; in the example above, if a current user isn't subscribed to any plan, you would have to choose between setting data.plan to null or simply skipping the call to PARSELY.updateDefaults.

#Valid values

Value strings are treated as case-sensitive by default.

Segmentation values should represent general categories of users. Sending personal information like names or email addresses is ineffective for creating segments, and a violation of our terms of use.

#Verification and debugging

To verify that your segmentation code is working as intended, you can inspect the raw pageview events that are sent to

Within the “Query String Parameters” section of the pageview request, you'll want to verify that the data property contains the correct value given your current segmentation status (whether signed-in, registered as a subscriber, etc.). Alternatively, you can also access that field by typing into the developer console.

It's worth testing each scenario that your business logic should handle, including the case when the custom data is not available.

Once you've made the integration changes to send custom data and verified the requests as described above, notify to enable the segments in your dashboard.

rocket emoji