Targeting traits

Targeting traits

Advertisers target users with segment rules over the traits you send in context. Send the traits your campaigns need, or those campaigns will not match.

How targeting works

On each serve call, Meridian Ads merges your context with any traits already stored for that user_key, then checks which campaigns match. New values overwrite old ones for the same trait key.

As an integrator, your job is to pass accurate, up-to-date traits. You do not define segment rules in code; advertisers set those in the console.

Rule operators

OpMatches whenIf trait is missing
eqTrait equals valueNo match
inTrait equals any value in valuesNo match
rangeNumeric trait is between min and maxNo match
existsTrait is present and not nullNo match

Rules combine with and or or inside nested children arrays. An empty segment matches everyone.

Example segment

This segment targets users in the US or Canada on the pro plan. If you omit country from context, the user will not match.

JSON
{
  "op": "and",
  "children": [
    {
      "rule": {
        "trait": "country",
        "op": "in",
        "values": ["US", "CA"]
      }
    },
    {
      "rule": {
        "trait": "plan",
        "op": "eq",
        "value": "pro"
      }
    }
  ]
}