1. Help Center
  2. Build
  3. Create a Client-Side Campaign

Custom Client-Side Triggers

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:

  1. Select New, then A/B Campaign.
  2. In the General section of the page, select Client Side from the Type drop-down.
  3. Open the Variations section of the page and select Find & Replace.
  4. Select Custom from the Triggers drop-down.

Custom Client-Side Triggers

When you do, the fields in the Triggers area changes as in the following image.

Custom Client-Side Triggers II

  1. 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.
  2. Continue creating your Campaign.