How to set up custom triggers

Custom triggers initiate custom events, reactions and are used in engagement tracking.

Here is an overview on how they are used in custom events.

How to set up custom triggers

To set up custom triggers click “Add/edit” in any section for setting up custom events.

wpfp11 custom events fields 1

Next, you will be able to set up triggers in sections that look like the one below.

A complete trigger consists of:

  • a name
  • an initiating action (e.g. click, form submission, page load, etc.)
  • and conditions that need to be met

To set up conditions, you should use paths to JavaScript’s front-end values. We recommend you use values from the fpdata object, but these can be any other JavaScript variables that can be accessed through the “window” object.

The fpdata object contains many variables that you will find useful when setting up a trigger.

fpdata object added by WP Full Picture
advanced triggers data paths

When you write the data path, you only need to remember to use the “>” symbol to indicate that some value is inside another one., for example, data located at window.fpdata.page_id should be entered as fpdata > page_id.

How to test triggers

To test triggers, you simply need to:

  1. turn on the “debug this trigger” option of a trigger you want to test
  2. save the changes on the page
  3. start testing your website using the Setup helper or open your site in incognito mode
  4. take actions that should initiate the trigger

When your trigger fires, you will see a new entry in the browsers console.

advanced triggers testing triggers
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted