Syntax for Audience Segment Logic

When you create reusable audiences, you can manually define segment logic using alphanumeric segment IDs (keys) and the following syntax:

  • () to indicate a group
  • || for OR
  • && for AND
  • ! for NOT (exclude)
NOTE

For example, the following logic:

(X5vUk1cNvZxvBJ3jMjTt) || (sfvXrmQkk77PL5OtHpLH) && !(SMWSjTZFiy9hR1bKm1vw || x08UReA0IcP9HAJdcGVe)

means (in plain English)

INCLUDE Segment ID X5vUk1cNvZxvBJ3jMjTt OR INCLUDE Segment ID sfvXrmQkk77PL5OtHpLH AND EXCLUDE (Segment ID SMWSjTZFiy9hR1bKm1vw AND Segment ID x08UReA0IcP9HAJdcGVe)
NOTE
In placement settings, you can use saved audiences either as audiences to explicitly target or as separate audiences to exclude from targeting. Make sure your segment logic reflects the purpose for which you will be using the audience.
recommendation-more-help
9ff4800f-94be-45f0-a5bf-09d0d7e96baa