Targeting Experiments and Firing Goals Based on a JS Condition

Target Based on Javascript Condition

You might want to fire a conversion or run an experiment when some sort of Javascript expression evaluates to "true". 

This DMP (Data Management Platform) feature allows it to target for example lead score/stage from your Marketing Automation tool (like Marketo, Pardot, Elequou, Hubspot or Salesforce) without too many efforts.

Important Note: Any javascript variable used inside the expression has to be defined before the main Convert Experiments tracking code. If they are defined later on the page, their values cannot be used at the time of evaluation and the condition might not be matched;

Note 1: The javascript expression will be evaluated into the global "window" context; 

Currently, it's possible to use the Javascript expression targeting in three locations:

1. Advanced Goal Setup; a goal can be fired if the javascript condition used evaluates to true:

 

2. Experiment Site Area; you can run an experiment on pages where a certain Javascript condition evaluates true:

 

3. Experiment Audience: You can run an experiment for a certain group of visitor. For example, if one has a certain javascript variable holding the visitor status (client or anonymous), then it would be possible to run an experiment only for clients:

 

Have more questions? Submit a request

Comments