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) => { zephrBrowser.run({ 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:
- Navigate to the relevant feature
- Select Content from the decision bar
- Drag the Custom Data decision point to the rules canvas
The Custom Data dialog box displays.
- Select the object that you want to query from the Property Name options
In our example, we select hasAdBlock.
- Select the condition from the Condition drop-down menu
In our example, we select Contains.
- 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:
- 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: