Zephr User Guide

Augment Your Decision Data

8 views 0

With this integration, you can add a custom data argument in the run command. This can be used in a Zephr feature to determine a customer’s journey.

The following example determines whether a user has Ad Block running on their browser:

document.addEventListener('DOMContentLoaded', (event) => {
  cdnApi: 'https://{zephr-cdn-url}',
  customData: {
    hasAdBlock: true

As you can see, the user does have Ad Block running.

This information is passed to the custom object. You can use the Custom Data Node in your Zephr Feature Builder to make a decision based on the response as follows:

  1. Navigate to the relevant feature
  2. Select Content from the decision bar
  3. Drag the Custom Data decision point to the rules canvas

    The Custom Data dialog box displays.

  4. Select the object that you want to query from the Property Name options

    In our example, we select hasAdBlock.

  5. Select the condition from the Condition drop-down menu

    In our example, we select Contains.

  6. Enter the value to search for in the Value text box

    In our example, we enter true.

    The Custom Data dialog box with our selections is as illustrated below:

    Browser-Side Features - Custom Data

  7. Select the Save button

Your rule now includes branches for the following user journeys:

  • Using Ad Block
  • Not using Ad Block

Common Custom Data Objects

You might want to make decisions based on whether a user has an Incognito Window, as well as whether they are running Ad Block.

You can use the following examples to pass this information to a custom data object for use in a browser-side rule: