Browse the help center

Target on custom parameters passed in the ad tag

Put a key-value such as cp.section=sport on the ad request, then target it with a Custom Parameter rule — Value, One of (with has all of on list parameters), Substring or Expression — and join parameters with and / or. Steps, caveats, a troubleshooting checklist and the full reference.

How-to network manager publisher advertiser Account → entity → Targeting / Pre-targeting → Custom Parameter

What it is and why

A custom parameter is any key=value your page, app or stitcher adds to the ad request — what other ad servers call key-value targeting. A Custom Parameter rule reads that value and decides whether the advertiser, campaign, creative, site, zone or placement is eligible. The parameter goes on the request first, the rule reads it second; the two halves live in different places, and both are on this page.

The everyday case: a publisher’s page sends cp.contentGenre=sport in the tag, and a sports betting campaign carries the rule contentGenre equals sport as Include. That campaign now serves on sport pages of every placement it is linked to and nowhere else — without a separate placement per section.

Cookie Value is the persisted cousin: it reads a cookie Epom set on the browser earlier instead of a value on the current request. It is a separate dimension and is covered in the reference.

Typical scenarios

  • Only sport pages. The tag sends cp.section=sport. Rule: Type Value · section · equals · sport · Include. A page sending section=news is rejected; so is a page that does not send section at all.
  • Everything except adult-rated shows. A CTV stitcher fills contentRating. Rule: Type One of · contentRating · is one of · TV-MA, TV-14 · Exclude. A request without a rating passes.
  • Users who are in both segment 1 and segment 3. The page sends every segment the visitor belongs to in one parameter, cp.segments=1,2,3,4,5. Register segments under Admin → Custom parameters with The request can carry several values and the comma separator, then add Type One of · segments · has all of · 1, 3 · Include. Requests carrying 1,2,3,4,5 or 1,2,3 match; 1,4,5 does not, because 3 is missing. On a parameter split on | the same request reads 1|2|3|4|5.
  • Men on sport pages. Two Value rules, gender equals male and genre equals sport, both Include. They land in two groups, and the list reads gender=male or genre=sport. Click the or ▾ between the groups so it reads and: now a request must carry both. Values of one parameter are always alternatives — adding genre equals news makes the list gender=male and ( genre=sport or genre=news ).

Step by step

The main path: a value in the tag, one rule that reads it, then a check that it serves.

  1. Put the parameter on the request. Add cp.section=sport to the generated tag — in the query string of a URL, API or Simple Iframe tag (…?key=<placement key>&ch=&cp.section=sport), or as data-cp-section="sport" on the <ins> of a Universal JS tag. To bake a fixed value into every tag of a placement instead, use the Settings tab of its Ad tags & API card: Parameter type → Custom Parameter, Key, Value, Add (Ad tags and the serving API).

    Ad tags & API card with a custom parameter added to the placement

  2. Open the entity’s Targeting card. On a campaign, creative or advertiser it is Targeting; on a site, zone or placement it is Pre-targeting. Switch the card on if it is off.

    Targeting card switched on, with the type list and the empty rule pane

  3. Pick Custom Parameter in the type list. It is in the Content & Apps group, below Cookie Value; the Find a targeting type… box filters the list. On a laptop-width window (about 1280–1440 px) the list sits above the editor; on a wider screen it is a column on the left.

    Targeting card with the Custom Parameter Type dropdown open showing Expression, Value, One of and Substring

  4. Fill in the rule. Choose the Type — the rule kind — then Parameter, Operator and Value (an Expression rule asks for one expression instead). Parameter picks from the parameters registered under Admin → Custom parameters, shown as name · label; choose Other parameter… to type a name that is not registered. Value always has an ⓘ beside its label: it tells you what the operator you picked matches, how to separate values and, on a list parameter, previews a match in that parameter’s own separator. Parameter shows one only for a list parameter on a Value or One of rule, saying the value arrives as a list; Operator has none.

    Custom Parameter editor with Type Value, Parameter loyalty, Operator equals and Value gold filled in, the Value hint open, Include and Exclude buttons enabled

  5. Click Include or Exclude. Include makes the rule a whitelist, Exclude a blacklist; both stay disabled until every field is filled. The rule appears at once as a chip in the Included: Custom Parameter or Excluded: Custom Parameter group — there is no separate save (Add, edit, and remove targeting rules). The chip reads the rule back: section equals "sport", section is one of [sport,travel,finance], or the expression itself; a rule on a list parameter ends in · list.

    Targeting card rule pane showing the saved Custom Parameter group with three chips: a Value rule, a One of rule and a Substring rule

  6. Join several parameters with and / or (optional). Rules on different parameters form separate groups and the list shows the connector between them: or ▾ by default, so any group is enough; click it to read and ▾, so every group must match. Values of the same parameter sit inside one group in parentheses and are always alternatives (And / or between groups).

    Included Custom Parameter list with two groups joined by the and connector

  7. Check that it serves. Request the placement with the parameter and without it. The $$CUSTOM_PARAM(section)$$ macro in a test creative shows the value the server received, and a troubleshooting task on the placement records the full request URL and which rule rejected it.

Caveats and exceptions

On the tag side

  • The cp. prefix (or cp_ — PHP rewrites . to _) is stripped before targeting, so a rule on section matches a tag sending cp.section. A bare section=sport is targetable too, but only prefixed parameters are packed into the cps value that travels onto click and conversion tracking and into custom-parameter analytics. Prefix them unless you have a reason not to. sub1 … sub10 are the exception: they count as custom parameters without a prefix.
  • There is no reserved-name list and no validation on keys; every request parameter shares one map, so a key that collides with one of Epom’s own silently overwrites it. Avoid key, u, cps, ch, tz, tzn, im, gdpr, gdprConsentIab, usPrivacy, gpp, gppSid, coppa, dnt, appName, maxDuration, plWidth, plHeight, sw, sh, dW, dH, click, via, tsrc, gpc, vpaid, ec, rptd, tmax and the four content* parameters unless you mean them. u can never be a custom parameter: it is overwritten with the remainder of the query string.
  • A Universal JS tag cannot keep the case of a key — HTML lowercases attribute names, so data-cp-Article_ID arrives as article_id. Harmless, because key names are matched case-insensitively, but it surprises anyone comparing tag types side by side.
  • Once on the request, a parameter is also available as the $$CUSTOM_PARAM(keyname)$$ macro in creatives, click URLs and pixels.

How values are read

  • Key names ignore case; values are case-sensitive in every kind: sport does not match Sport. (Cookie Value is the opposite: its value comparison ignores case.)
  • A missing parameter is not an error: it reads as the empty string and the comparison runs. So the positive operators (equals, is one of, has all of, contains, > …) never match an absent parameter, and the negative ones (not equals, is not one of, not contains) always do. An Include rule with a positive operator therefore rejects every request until the tag sends the parameter, and an Exclude rule with a negative operator fires on every request that omits it. To mean “exclude sport”, use Exclude with equals, not Include with not equals. (Epom can set a server-side default for a parameter; none is set out of the box.)
  • The typed One of and Substring list is URL-decoded before it is split: a + reads as a space and %2C as a separating comma, so type %2B for a plus sign and %25 for a percent sign. A typed 18+ is read as 18; a value picked from a registered list is encoded for you (18+ is stored as 18%2B) and matches 18+.
  • A One of value with a comma inside it is written \,, and \\ is a backslash. A Substring part cannot hold a comma at all: the backslash is kept, so \, only matches the literal text \,, and %2C does not help because the list is decoded before it is split.
  • Substring URL-decodes the request value too, so /sport/ matches %2Fsport%2F. Value and One of compare the raw string.
  • The Value kind expands $name inside its Value field: $otherparam compares one request parameter against another. A literal that starts with $ followed by letters is substituted away — keep $ out of a plain value, or use One of.
  • App Package is a different dimension with one box, and it is not split on commas: a typed com.a, com.b becomes one rule that never matches. Use Bulk add for several packages.
  • The operator dropdown has no fixed order; read the label, not the position.

List parameters (several values in one request)

  • Out of the box a One of rule compares the request value whole: genre is one of pop does not match cp.genre=rock,pop. Only once the parameter is registered with The request can carry several values is the request split, item by item, and only One of splits — Value, Substring, Expression and the $$CUSTOM_PARAM()$$ macro still read the whole value. The setting belongs to the parameter, so every One of rule on it, at every level, splits the same way; ad serving picks the change up within a minute.
  • has all of is offered only on a list parameter — on a whole-read value it could only mean “equals” — and the server refuses it elsewhere. There is no negated form; add the same rule with Exclude.
  • A One of value that itself holds the separator (rock\,pop on a comma-split parameter) can never equal one item, so that rule never matches; the editor warns as you type it and the parameter’s admin page lists such rules under Used by.
  • The request value is URL-decoded once before splitting: rock%2Cpop splits, a double-encoded rock%252Cpop does not.

Expressions

  • $name is substituted with quotes: $section == 'sport' becomes 'sport' == 'sport'. Never quote the $name yourself ('$section' becomes ''sport'', a syntax error), and never compare it with an unquoted word ($section == sport is a reference error, read as “could not evaluate”, which rejects the request on an Include rule).
  • === is JavaScript’s strict equality. Against a quoted literal it behaves like ==, but $age === 18 compares a string with a number and never matches; write $age == 18, or quote the number. The editor’s placeholder shows ===, so mind this when comparing numbers.
  • An invalid expression is rejected when you click Include — the button enables as soon as the box is non-empty, so the check is server-side. An expression that returns something other than a boolean passes the check and never matches.
  • Each evaluation has a statement budget; a script that spends it (a loop that does not end) is “could not evaluate”. Results are cached for an hour, keyed on the substituted text, so anything that is not a pure function of the parameters — new Date() — goes stale. Use the Time Range or Day and Time dimensions for wall-clock logic.

Where the rule applies

  • Rules cascade down: a rule on a campaign applies to all of its creatives, one on a site to every zone and placement under it. Put the rule at the narrowest level that needs it.
  • These rules do apply to DSP (RTB) demand despite the DSP: No mark in the dimension reference: a DSP creative whose targeting fails is dropped before the bid request is built. What the rule cannot do is travel to the DSP — OpenRTB has no field for an arbitrary key-value, so the buyer never sees it. Filter on your side.
  • A publisher has no Pre-targeting card: the publisher puts the parameter on the request, the network writes the rule. Agree the key names first. A Can View share shows the rules but cannot change them; that takes Can Edit or Is Owner.

Not working?

SymptomLikely causeCheck
The entity stopped serving the moment the rule was addedThe tag does not send the parameter yet, so a positive Include rule rejects everythingLoad the placement with $$CUSTOM_PARAM(name)$$ in a test creative, or read the request URL in a troubleshooting task
Rule looks right, matches nothingA typo in a name typed after Other parameter… resolves to empty — ad serving cannot tell a typo from an unsent parameter; or the value’s case differsPick the parameter from the registered list; compare the exact value the tag sends
is one of pop does not match rock,popThe parameter is not registered as a list, so the value is compared wholeAdmin → Custom parameters → The request can carry several values, right separator; wait a minute
has all of is not in the operator listThe parameter is not a list parameter, or the picked parameter changed to a plain oneRegister it as a list; the operator appears on One of only
Traffic died after an Exclude ruleA negative operator (not equals, is not one of, not contains) fires on every request without the parameterUse Exclude with the positive operator instead
Typed 18+ or 50% never matchesThe typed list is URL-decoded: + became a spaceType 18%2B / 50%25, or pick the value from the registered list
A Substring part with a comma never matchesA Substring part cannot hold a commaUse a One of rule with \,, or shorten the part so it has no comma
An Expression never matches=== against an unquoted number, an unquoted word, a non-boolean result, or a cached new Date()See Expressions above; prefer a Value rule for one comparison
The DSP bid ignores the parameterExpected: the parameter is never sent in the bid requestKeep the rule on the Epom side
Reports do not show the parameterIt was sent without the cp. prefix, so it is not in cpsPrefix it in the tag
Served on one placement but not anotherA rule at a broader level (site, zone, advertiser) cascades downOpen the Targeting / Pre-targeting card of every level above
Custom Parameter is missing from the type listThe role lacks the Custom targeting (or pre-targeting) permission, or the share is Can ViewUsers and roles; ask for Can Edit
A Cookie Value rule never matches your own cookieIt reads only cookies Epom set, prefixed eas_3p_; and not on Safari, iPhone, cross-site Firefox, private windows, apps or CTVCookie Value

Reference

The full tables — every operator with a worked example, the list-splitting rules, the several-values matrix, the absent-parameter matrix, the Expression kind, Cookie Value and the API — are on the Custom Parameter targeting reference. The essentials:

KindOperatorsReads
Valueequals, not equals, >, ≥, <, ≤one value; numeric operators need both sides to parse as numbers
One ofis one of, is not one of, has all of (list parameters only)a comma-separated list; \, for a comma inside a value
Substringcontains, not containsa comma-separated list of parts, no comma inside a part
Expression—one JavaScript expression with $name variables; $CLIENT_USER_AGENT is always available
  • Separators. The rule’s list is split on commas only — not semicolons, not line breaks. The request’s value is split only on a list parameter, on the separator chosen for it (comma, pipe, semicolon or space).
  • Combining. Include rules: one matching rule is enough; the first matching Exclude rule rejects. Rules on one parameter are one group (always or); different parameters, list parameters and Expressions are groups of their own, joined by the list’s or ▾ / and ▾.
  • Permissions. The Custom entry under the role’s Targeting permissions (demand side) or Pre-targeting permissions (supply side), plus Manage Demand Targeting or Manage Supply Pre-targeting; Cookie Value has its own entry in both groups.
  • API. POST /rest-api/{entity}/{id}/targeting/custom/create.do with rule, customValue and, for the non-expression kinds, customType, operation and parameter; POST /rest-api/{entity}/{id}/targeting/match-mode with type=CUSTOM, rule and matchMode (ANY / ALL) switches a list between or and and. Entity is advertiser, campaign, banner, site, zone or placement. Enum values and error cases are in the reference.

When the request sends several values

A parameter registered under Admin → Custom parameters with The request can carry several values is split on its separator, and every One of rule on it reads the request item by item; has all of needs every listed value among the items. The worked matrix is in the reference: When the request sends several values.

How the Value list is split

One of and Substring take a comma-separated list, URL-decoded, trimmed, empties dropped, duplicates collapsed; \, escapes a comma in One of only. The full rules, with the Substring difference and what picked values are stored as: How the Value list is split.

Target the show a stitcher describes

A CTV stitcher called through a VAST tag with an upstream macro preset fills contentGenre, contentRating, contentLivestream and contentLanguage on the request, with no cp. prefix. Target them like any parameter — contentGenre is one of Sports, News, contentRating is one of TV-MA, TV-14 as Exclude, contentLivestream equals 1. Values are trimmed, an unexpanded macro counts as not sent, and true / false read as 1 / 0. Spellings and the absent-parameter rules: Target the show a stitcher describes.

Cookie Value reads a cookie Epom set on the browser earlier (eas_3p_<name>, written by the /multi-cookie.gif|js|html endpoints), not a value on the current request; the comparison ignores case. Setup, lifetimes and the comparison with Custom Parameter: The persisted variant — Cookie Value.

Several cookies: any of or all of

Values of one cookie name are always alternatives; the or ▾ / and ▾ between different cookie names decides whether a visitor needs any of them or every one. The multi-step funnel example and the cookie caveats: Several cookies: any of or all of.

Related pages

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.