Link Search Menu Expand Document


Custom Variable Targeting


Last updated on October 21, 2019

Custom variables, or key-value pairs, can be used to target or block inventory. When setting up custom variables for targeting, be mindful of the following:

  • Custom key-value pairs must be in lowercase.
  • Custom key-value pairs are recommended to not exceed 20 characters per key / 40 characters per value.

Custom Variables Targeting Options

Targeting dimensionOperatorsDescription
Enter a custom variable nameString:

• Equals
• Does not equal
• Ends with
• Contains
• Begins with
• Does not end with
• Does not contain
• Does not begin with
Use a string operator when you expect a single string value to be passed in the ad request for a given custom key.

For example: pet equals "dogs"

Make sure to use the list operators instead of string operators if you are expecting multiple values to be passed in the ad request.

The star (*) wildcard is supported when using Contains or Does not contain operators.
Enter a custom variable nameNumeric:

• Less than
• Less than or equal to
• Greater than
• Greater than or equal to
Enter a numeric value to target.
Enter a custom variable nameDate:

• Before
• After
Use this format: YYYY-MM-DD
Enter a custom variable nameList:

• Contains any of
• Contains all of
• Contains only
• Contains none of
Use a list operator when you expect multiple string values to be passed in the ad request for a given custom key. Use commas between each value with no spaces or other formatting.

For example: dogs,cats,horses

Suppose you create the custom key xyz and use operator contains any of with the above values, the targeting for this custom key-value pair would be:

xyz [ contains any of ] "dogs", "cats", "horses"