Can't use "contains partial string" in a rule for a Universal Variable?

Bronze Contributor
Bronze Contributor


My site has a data layer object (specifically, an Event Attribute / Universal Variable) in the form of an array, like so:

product_name = ["Blue Jeans"]

I am building an audience to capture "Jean Viewers". Per the article here ( I want to utilize the "contains partial string (ignore case)" logic to capture users who view any color of jeans (e.g., "Purple Jeans", "Yellow Jeans", etc). 


When I go to define the rule to capture Jean Viewers I do not appear to have the "contains partial string (ignore case)" rule available to use:

image (6).png

I suspect this is because the "product_name" variable is not an array-type, and therefore the clause won't show up. When I select an array in the form of a visitor attribute then the clause appears as expected.

Without changing the data type of the product_name object, is there any other way to use wildcard matching in this case? The reason I ask is because I prefer to not have to create a rule for every color of jeans (because in a real-world scenario there may be hundreds of styles and names). My solution in this case was to use an array, "Products Viewed" visitor attribute, but I am curious if there's another way.

Thank you!


Can't use "contains partial string" in a rule for a Universal Variable?

Employee Emeritus

Hi @Teuszie 

Thanks for reaching out. When variables are added to TiQ and a publish is made to PROD.  They will automatically be added to EventStream as an "any-type" attribute, and as you have experienced, it will limit the available conditions that can be applied to it.  You are correct in your thinking, the two options would be to:

1. change the Event Attribute from "any-type" to "array"

2. Create a Visitor Attribute Array that is based off of the Event Attribute

Great job!