- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
This article describes the set of strings attribute and how to use it.
In this article:
Before you begin, familiarize yourself with the following:
The set of strings attribute stores a set of unique text values. Values in a set are only stored once, regardless of the number of times they occur for the visitor or visit. The set of strings attribute is most commonly used for product categories viewed, pages viewed, and products purchased.
Examples:
Attribute Name | Values |
---|---|
Product Categories Viewed | "Home Improvement", "Electronics", "Apparel", "Kitchen" |
Browsers Used | "Chrome", "Safari" |
Cart Items | "iPad", "Screen Protector", "Headphones" |
The set of strings attribute is available in the following scopes: Visit and Visitor.
There are no storage capacity limits for sets of strings, but these attributes are still limited by the maximum size of the profile after encryption and compression.
Add a string value to a set of strings. Adds only unique strings.
Attribute Name: product_category
Starting Value | "Home Improvement", "Electronics", "Kitchen" |
---|---|
Enriched With | "Apparel", "Electronics" |
Resulting Value | "Home Improvement", "Electronics", "Kitchen", "Apparel" |
The result ignores the "Electronics" item because it exists already in the set of strings.
This enrichment is used to save the values from an array of strings attribute into a set of strings attribute. All duplicate elements in the array are ignored in the new set, which permits only unique strings.
Attribute Name: Product Categories Viewed
Starting Value | "Kitchen" |
---|---|
Enriched With | ["Home Improvement", "Electronics", "Kitchen"] |
Resulting Value | "Home Improvement", "Electronics", "Kitchen" |
This enrichment appends the values from another set of strings attribute into the set of strings. For example, to track the product categories that a visitor purchases from you might have two set of strings attributes named "Categories Purchased", with one scoped to visit to capture when the purchase occurs and one scoped to visitor to store the master set.
Visit: Categories Purchased | Visitor: Categories Purchased |
"Electronics" |
"Electronics" |
"Kitchen", "Apparel" |
"Electronics", "Kitchen", "Apparel" |
"Kitchen", "Electronics" |
"Electronics", "Kitchen", "Apparel" |
While the set of strings scoped to visit is overwritten with new values each time, the enrichment copies those values into the set of strings scoped to visitor where the master list expands, storing each unique value encountered.
Attribute Name: Product Category Purchased
Starting Value | "Electronics" |
---|---|
Enriched With | "Home Improvement", "Electronics", "Kitchen" |
Resulting Value | "Electronics", "Home Improvement", "Kitchen" |
Create a new set of strings attribute that contains the items from one set of strings that do not appear in another set of strings. For example, to find the categories that a customer browsed, but did not purchase from, use this enrichment to find the difference between "Categories Browsed" and "Categories Purchased".
Example:
Find values present in: "Categories Browsed" and that are not in: "Categories Purchased"
Attribute Name: Browsed Categories Not Purchased
Starting Value | |
---|---|
Enriched With |
"Categories Browsed": "Categories Purchased": |
Resulting Value | "Kitchen", "Windows" |
Remove a set of strings based on a set of conditions. This is the equivalent of deleting the set.
Attribute Name: product_category
Starting Value | "Home Improvement", "Kitchen", "Windows" |
---|---|
Resulting Value |
Lowercase a set of strings based on a set of conditions.
Attribute Name: product_category
Starting Value | "Home Improvement", "Electronics", "Kitchen" |
---|---|
Resulting Value | "home improvement", "electronics", "kitchen" |
Create a set of strings using the highest valued items from a tally. For example, to track the three most viewed products, create a set of strings to capture the top three entries from a tally attribute that tracks the occurrences of viewed products.
Attribute Name: Top 3 Products Viewed
Starting Value | |
---|---|
Enriched With | Top 3 Items in "Viewed Products": { |
Resulting Value | "iPhone Case", "iPhone 10", "AirPods Pro" |
Create a set of strings using the items from a tally whose values are above a set threshold. For example, to track products that have been viewed more than 20 times, create a set of strings to capture the entries from a tally attribute that tracks the occurrences of viewed products.
Attribute Name: Products Viewed 20+ Times
Starting Value | |
---|---|
Enriched With |
Items in "Products Viewed" that are greater than 20: |
Resulting Value |
|
Remove an entry from a set of strings based on a set of conditions. For example, remove the entry "iPhone Case" from a set of strings that tracks a product wishlist because it has been purchased.
Attribute Name: Product Wishlist
Starting Value | "iPhone 10", "AirPods Pro", "iPhone Case" |
---|---|
Enriched With |
Remove |
Resulting Value | "iPhone 10", "AirPods Pro" |
Copyright All Rights Reserved © 2008-2023