Creating a Trigger

Triggers are a set of conditions that you can use to determine when Zaraz should or should not send events to third-party tools. In most cases, you would like to capture specific site actions that are relevant to your business. In this case, a trigger will usually be based on an action that the end-user has taken on your website, and the indication of that action will be passed to Zaraz using the Events API, the dataLayer, or the zarazData object. For example, when a user clicks a button, you can use the Event API to track this activity and use it as a trigger to send events to specific tools.

In order to set a new trigger, this is what you need to do:

  1. On the triggers section, click the plus sign at the bottom of the page.
  2. The "Create Trigger" page will open. First, give the trigger a name. This name will be used in the Zaraz dashboard and should be descriptive.
  3. In order for other team members to understand the trigger, you can give it a more detailed description.
  4. Click "add new load rule" to set up the rules for this trigger. If these rules are met, then the trigger will be sending the event.
  5. When you click on the variable name field, a drop-down menu will appear. You can pick the variable that you want to validate. And then you need to set the rule operator and the value it should match.
  6. You can also add an exclude rule. Exclude rules are conditions that would prevent this trigger from firing. For example, if you wish to block this trigger from loading on a chrome browser, you can add it as an exclude rule.
  7. When you are done, hit the save button.