Load rules are used to determine when a tag should load on your site. Rules are made up of one or more logical conditions based on values in the data layer. If the conditions evaluate to true, then tags are loaded. If they are false, then tags are not loaded.
page_type variable is often used in load rules because its values represent the types of pages of your site e.g., "category", "product", "cart", and "order", which makes it ideal for creating rules to load tags on those pages of your site.
You can manage load rules directly from the tag configuration window or from the Load Rules screen. The default load rule is "All Pages", which means the tag will load on every page where the Tealium tag is installed. To only load a tag on certain pages, a new load rule with a condition is needed.
Conditions are formed using the following parts:
In the following example, checks are made to ensure that the current page is the shopping cart page:
page_type equals "cart"
In this lesson, you will create a rule that identifies the live production website so that you can ensure that your tag is never loaded on your QA/staging site. The rule will check to ensure that the built-in variable named
domain does not contain the words "stage" or "qa", which would indicate that it's the production site (i.e. if the domain is "qa.yourdomain.com", the rule will be false).
Use the following steps to add this load rule:
Great! You now have a tag that will only load on the production site (no domains that contain "stage" or "qa"). Click Next to see how to apply data mappings to send data to your tag.