When you select Client-Side as the type of Campaign, a larger collection of Triggers is available to you. Among them is the Custom Trigger, which allows you to provide JavaScript code to run in the context of the current page. If the function returns true, the Trigger is satisfied; otherwise, SiteSpect does not apply the changes defined by the Variation. The first line and the last line of the field are not editable.
When this Trigger is satisfied, SiteSpect applies the changes specified in the What to Change area.
Note: Custom Triggers are available only for Client-Side A/B Campaigns. In addition, they do not allow the OR operator between Triggers.
To define a Client-Side Trigger:
- Select New, then A/B Campaign.
- In the Variations section of the page, select Client Side from the Type drop-down.
- When in the Variations section of the page select Find & Replace.
- Select Custom from the Triggers drop-down.
When you do, the fields in the Triggers area changes as in the following image.
- Enter the JavaScript code that you want to run on the current page. In the course of a Campaign, if this resolves to true, SiteSpect applies the changes specified in the What to Change area of the page.
- Continue creating your Campaign.