Shown below is an example of the “Add Tags to Vistor” action that sets Tags on the Visitor object, based on custom Ruleset Conditions:
The Tag(s) will be set on the Visitor if the Ruleset Conditions evaluate as TRUE. However, the Rule must be set to “ON“, a “Fire On” property must be set, the “Add Tags to Vistor” Action must be selected, and the appropriate Tags must be added to the Action. The “Fire On” Rule property can be set to:
- Every Page
- Once per Visit
- Once per Visitor
- Every Request (must be used for File or image asset paths)
Retrieving Action Attributes in the Response Header using Velocity
This Action assigns Tags to the Visitor object. With this Action you only need to set the Tag value(s).
You can also later retrieve the Tags from the Visitor Object using Velocity:
Important Reminder: The Rule must be set to ON for the Tags to be set on the Visitor object by the Action.
For more information on retrieving the tags from the Visitor object, please see the documentation on Accessing the Visitor Object Using Velocity.
Maximum Number of Tags
By default, you may add a maximum of 20 tags to the Visitor object using the Action. However you may increase or decrease the maximum number of tags this action allows by changing the
api.system.ruleengine.actionlet.VisitorTagsActionlet.MAX_TAGS property in the dotmarketing-config.properties file:
Note: It is strongly recommended that all changes to the dotmarketing-config.properties file be made through a properties file extension.