Create a trigger
Triggers define the conditions under which a tool will start an action. Since a tool must have actions in order to work, and actions must have triggers, it is important to set up your website’s triggers correctly. A trigger can be made out of one or more Rules. Zaraz supports multiple types of Trigger Rules.
- Log in to the Cloudflare dashboard ↗, and select your account and domain.
- Go to Zaraz > Tools Configuration.
- Select the Triggers tab.
- Select Create trigger.
- In Trigger Name enter a descriptive name for your trigger.
- In Rule type, choose from the actions available in the drop-down menu to start building your rule. Refer to Triggers and rules for more information on what each rule type means.
- In Variable name, input the variable you want as the trigger. For example, use Event Name if you are using
zaraz.track()
in your website. If you want to use a variable you have previously created in Variables, select the+
sign in the drop-down menu, scroll to Variables, and choose your variable. - Use the Match operation drop-down list to choose a comparison operator. For an expression to match, the value in Variable name and Match string must satisfy the comparison operator.
- In Match string, input the string that completes the rule.
- You can add more than one rule to your trigger. Select Add rule and repeat steps 5-8 to add another set of rules and conditions. If you add more than one rule, your trigger will only be valid when all conditions are true.
- Select Save.
Your trigger is now complete. If you go back to the main page you will see it listed under Triggers, as well as which tools use it. You can also Edit or Delete your trigger.