Augment your decision data
Integrate custom data arguments in Zephr to enhance decision-making based on user behavior, such as detecting Ad Block usage.
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:
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: