Activation (variable-based) Conditions

Activation conditions allow to restrict triggering of the tag to when some state of the page, user browser on environment matches some value. The sequence is straightforward, to add a restriction for some tag or notice object:

  1. A rule should be created (or selected from the list of those created before)
    add-rule.png
  2. "+ Add condition button" would add a comparison condition to the rule
    add-condition.png
  3. A "variable" or the left, the matching operator in the center and the value to match against on the right should be specified
  4. The rule would evaluate to "true" if all activation conditions are met (in addition to temporal and other conditions of the rule), the tag or notice object would fire if at least on rule of those attached evaluates to "true"

Variables to match

One may create custom variable to match against some value (selecting "New variable..." at the bottom of the dropdown list), and naturally select one of custom variables previously created. However, most of the users may benefit from predefined ("system") variables available for selection:

  • URL.whole - the whole page URL, e.g. http​://support.mezzobit.com/entries/30640936-Temporal-conditions?foo=bar#hash
  • URL.protocol - the protocol part of the URL, e.g. http in the above case
  • URL.hostname - the hostname part of the URL, e.g. support.mezzobit.com in the case above
  • URL.port - the port part of the URL; it would be an empty string in the above case, however for something like http​​://www.​example.com:8080/ it would be the 8080 numeric value
  • URL.pathname - the pathname part, /entries/30640936-Temporal-conditions
  • URL.search - the query part, ?foo=bar
  • URL.hash - the hash part, #hash
  • UA - UserAgent string, universal browser software identifier
  • Referrer - the URL of the page the user has come from (if any)
  • Language.whole - the browser language tag according to IETF list, like "en-GB"
  • Language.base - the short browser language code, the first part of the above, like "en" (ISO 639-1 standard)
  • Location - the user location based on his IP lookup in the GeoIP database; it's possible to enter the list of unions, countries, states, cities, postal and DMA (aka metro, for USA only) codes
  • Rand - the random integer value between 0 and 4294967294 (inclusive)

The use of Event variable is described in the separate article

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.