How category targeting matches Ads

How Kevel compares the category on a request with the category rules on a Flight or Ad, for ad ops and integrators.

Category matching is how Kevel decides whether an Ad is eligible on the category page a request comes from. It applies to Flights and Ads that have category rules, on networks where category targeting is enabled. You meet it when an Ad does not serve where you expected, or serves where you did not.

How it works

Each request carries a category on each placement. Each category rule on a Flight or Ad is a saved category ID, marked include or exclude. For each placement, Kevel compares the request's category with the Ad's rules and keeps the Ad only if the comparison passes. The comparison is one condition among the Ad's other targeting, so the Ad must also pass its keyword, geo, segment and other conditions.

Exact matching

Kevel trims spaces from the start and end of the request's category, then compares the whole value with each saved ID. The comparison uses an exact match.

  • Matching is case-sensitive. Womens-Shoes and womens-shoes will not match. Ensure consistent capitalization between targeted categories and category sent in the ad decision request.
  • Leading and trailing whitespace is trimmed. Separators and spacing inside the value must match.
  • A parent does not match its children. A rule for Grocery matches requests whose category is Grocery, and does not match Grocery > Dairy.
  • There are no patterns. A saved ID is compared as text, with no wildcards.

For logs and reports, Kevel splits each category on the delimiter ( > by default) and trims whitespace around each level, so Grocery>Dairy and Grocery > Dairy both report as Grocery > Dairy. Targeting compares the whole string exactly, so Grocery>Dairy does not match a saved Grocery > Dairy.

🚧

Selecting a category targets that category page only. To cover a parent and its children, select each category you want. In the Ad Server UI, Select all next to a parent adds the categories below it and not the parent.

Include and exclude rules

Each rule is either an include or an exclude.

  • Include: the Ad is eligible when the request's category matches this category.
  • Exclude: the Ad is not eligible when the request's category matches this category.
The Category Targeting panel with Type set to Exclude. The table lists five Include rows and one Exclude row, Soft Drinks.

With includes, the Ad is eligible only on those categories. With excludes only, the Ad is eligible on every category except those, including categories that are not in your category list. Because a parent does not match its children, excludes are most useful on their own. When a list has includes, a category you have not included is already not eligible.

When a request carries a category, an Ad passes category targeting if it has no category rules, if one of its include rules matches, or if it has only exclude rules and none of them matches.

❗️

If a request carries no category, an Ad with any category rule is not eligible, including an Ad that only excludes categories. Send a category on every placement where those Ads should serve. An empty value or one made only of spaces counts as no category.

Flight and Ad rules

An Ad with no category rules uses its Flight's rules. An Ad with its own category rules uses them instead of the Flight's. The two lists are not merged, and an Ad that only excludes categories also replaces a Flight that includes them.

Skip category targeting for a request

A request can bypass category rules. Set skipFilters with category set to true on the placement, and Ads with category rules are eligible whatever category the request carries. It affects only that request, and the targeted and matched category are left out of the event logs. See skipFilters.

Category bid modifiers

A category bid modifier changes an Ad's bid when the request's category matches the modifier's category. It uses the same exact comparison as the rules above. A modifier never makes an Ad eligible. It applies only on requests where the Ad is already eligible and the request carries a category that matches. Only one bid modifier applies to a request, the one that gives the highest price, so a keyword modifier can outrank a category modifier. See Bid modifiers.

What you control

SettingWhere you set itWhat it changes
Category rulesThe Flight or Ad, in the Ad Server UI or Management API. See Set up category targetingWhich categories an Ad is eligible on
The request's categoryYour ad requests. See Send a category in decision requestsThe value Kevel compares with your rules
The delimiterSet by Kevel for your networkHow a category is split into levels in logs and reports, and not matching

Examples

RulesRequest's categoryWhat happens
Include GroceryGroceryThe Ad is eligible
Include GrocerygroceryThe Ad is ineligible, because matching is case-sensitive
Include GroceryGrocery > DairyNot eligible, because a parent does not match its children
Include Grocery and ToysToysThe Ad is eligible
Exclude ToysGroceryThe Ad is eligible
Exclude ToysToysNot eligible
Include GroceryNo category sentNot eligible
Exclude ToysNo category sentNot eligible
Flight includes Grocery, the Ad has no rulesGroceryThe Ad is eligible, because it uses the Flight's rules
Flight includes Grocery, the Ad includes ToysGroceryNot eligible, because the Ad's rules replace the Flight's rather than adding to it
No category rules on the Flight or AdAny, or noneCategory targeting does not affect the Ad

Related


What’s Next

Set up category targeting and send the category