Rule Basics

The basic function of a rule is to compare a variable and a user-provided value or function. If they match, the rule returns true, otherwise it returns false. For instance, does the URL contain a particular word or does the cookie's name match a regular expression (regex).

The core of the rule is formed by its activation conditions. You choose a variable from a list of user-defined or system variables, choose an operator, and choose a value. You can add additional conditions, but the rule will only return true if all conditions are true (an implied AND operator). If you wish to use an OR operator, simply construct separate rules and join them within the Tag Editor, which returns true if any rules are satisfied.

Rule topics:

 

New rule


Creating rules

1. On the Dashboard, click New rule.

New rule

The New rule window is displayed. Required items are marked with an asterisk.

2. Type a unique name for the rule in the Name box.

Name

3. Optional: Type a description of the rule in the Description box. A description can help you identify this rule later.

Description

4. Click Create to create the rule and return to the Dashboard.

 

Scheduling rules

If this rule should be active for a limited amount of time, click Add period/schedule.

  • Use the calendar controls to pick a start date/time and end date/time for the rule.

    Calendar

  • If the active period for this rule is more complicated than a date/time range, use the Year, Month, Day, Day of week, Hour, and Minute controls to set up the rule's schedule. For example, if this rule should be active only on Thursdays, choose Thursday from the Day of week control.

 

Adding conditions to rules

Click Add condition to add a condition to a rule. A rule is true only when all conditions are true (AND logic).

Activation conditions

 

Rate limiting

Rate limitation causes your rule to return a false value even when it is true if certain rate conditions are met.

Rate limiting

  • No rate limiting
  • Activate in X chances per Y: Creates a random distribution to only allow X true values in Y true occurrences.
  • Activate not more than X times in Y seconds: Creates a random distrubtion over a defined time range to only allow X true values in Y seconds.

 

Geography

By default, rules inherit time zone information from the parent tag. Rules can also inherit time zone information from the user's browser.

If this rule relies on rules specific to a country or time zone, choose them from the Country and Time zone lists.

Geography

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.