How to use triggers with your automaton?

Overview of Triggers

Triggers allow you to control where Viously Players are displayed on your website. They are used in conjunction with automatons to ensure that the video players appear only on specific pages based on the URL's pathname or search parameters.

For more information on how to set up automatons, visit: How to Use the Automation Feature to Embed Players on Your Website?

Below are the different types of triggers you can use:

Basic Triggers

These are the simplest forms of triggers, used to match parts of the URL path.

Trigger TypeDescriptionExample ValueExample URL Path
equalsDisplays the player on one specific page./sciences/actualites/astronomie-satellite-fermi-brouille-explications-origine-sursauts-gamma-92700//sciences/actualites/astronomie-satellite-fermi-brouille-explications-origine-sursauts-gamma-92700/
containsDisplays the player on any page that includes the specified value in the URL.astronomieAny URL that contains astronomie, e.g., /sciences/actualites/astronomie-satellite-fermi.../
starts withDisplays the player on any page whose URL starts with the specified value./sciences/actualites/Any URL that starts with /sciences/actualites/, e.g., /sciences/actualites/astronomie.../
ends withDisplays the player on any page where the URL ends with the specified value.92700//sciences/actualites/astronomie-satellite-fermi-brouille.../92700/
does not equalDisplays the player on every page except the one with the specified URL./sciences/actualites/astronomie-satellite-fermi-brouille-explications-origine-sursauts-gamma-92700/Any URL other than the specified one.
does not containDisplays the player on any page that does not include the specified value.satelliteAny URL that does not contain the word satellite.
does not start withDisplays the player on any page whose URL does not start with the specified value./sciencesAny URL that does not start with /sciences.
does not end withDisplays the player on any page whose URL does not end with the specified value.92700/Any URL that does not end with 92700/.

Advanced Triggers Using Regular Expressions

Advanced users can create more complex patterns using regular expressions (RegEx) to target URLs. This allows greater flexibility in determining where the player is displayed.

Note:

  • You need to follow the specific regular expression syntax for these triggers.
  • Building patterns with regular expressions may require developer expertise.
Trigger TypeDescriptionExample ValueExample URL Path
matches RegExDisplays the player on any page where the URL matches the regular expression.^\/sciences/actualites/.*(mars|earth|venus).*Any URL that starts with /sciences/actualites/ and contains mars, earth, or venus.
matches RegEx (ignore case)Same as the above but case insensitive.--
does not match RegExDisplays the player on pages where the URL does not match the regular expression.^\/planete/.*(pollution|catastrophe).*Any URL that does not start with /planete/ and does not contain pollution or catastrophe.
does not match RegEx (ignore case)Same as the above but case insensitive.--

Regular Expression Syntax Guide

To learn more about how to use regular expressions, check out the following resources:

You can also test your regular expression patterns using this online tool: regex101.com.