Keywords and phrases

  1. Set up targeting in the interface
  2. Changes in ad tags
  3. Example of targeting

You can use targeting by keywords or phrases in different ways. For example, you can insert user search queries in the ad tag or set up targeting by names and hobbies, using the user base to more accurately identify the target audience.

We recommend using keywords and phrases for open sets for targeting by parameters that have a potentially infinite number of possible values. For example, search results, the name of a registered user, and so on.

Only keywords and phrases are passed in a request to Adfox without involving user's personal data.

To set up targeting by keywords and phrases:

  1. Assign keywords or phrases to an object (campaign, placement level, or banner) in the Adfox interface.
  2. Add the same words or phrases as additional parameters to ad tags on the desired site pages.

Set up targeting in the interface

To set up targeting, go to the Targeting → Keywords tab and select the targeting logic:

Words are separated by spaces or commas.

In the section:

  • Has any keyword/phrase from: list the words to enable impressions for.
  • Doesn't have any keywords/phrases from: list the words to disable impressions for.

If the request contains words from both sections, the banner won't be displayed (because of the words from the prohibited list).

Changes in ad tags

To make sure that targeting by keyword works, on the site page, insert parameters with values in name: value format into the ad tag's params object, where:

  • name is the parameter name (pk or pke).
  • value is the parameter value enclosed in single quotes.
Parameter Description
pk

Value:

  • Keywords: No more than 10 keywords separated by a space (or %20 for XML codes).
  • Phrases: Only one phrase.

Not case sensitive. No value encoding is required.

pke

Defines the encoding of keywords. Acceptable values:

  • 0 if CP1251 encoding is set for the entire site.
  • 1 if UTF-8 encoding is set (recommended).
Changing the code with the context.js library

You can see examples of code changes:

Example 1: A single keyword
params: {
    pp: 'g',
    ps: 'bnfx',
    p2: 'evbi',
    pk: 'great',
    pke: '1'
}
Example 2: Multiple keywords
params: {
    pp: 'g',
    ps: 'bnfx',
    p2: 'evbi',
    pk: 'great rather good excellent',
    pke: '1'
}
Example 3: Phrase
params: {
    pp: 'g',
    ps: 'bnfx',
    p2: 'evbi',
    pk: 'great idea',
    pke: '1'
}
Changing a link to get XML

Substituting the following to the request XML string:

  • A keyword
    http://yandex.com/ads/adfox/226279/getCode?pp=eez&ps=fecx&p2=hiuv&pk=great%20rather%20good%20excellent&pke=1
  • A phrase
    http://yandex.com/ads/adfox/226279/getCode?pp=eez&ps=fecx&p2=hiuv&pk=great%20idea&pke=1

Example of targeting

See below how to display banners for the keywords "bad" and "excellent":

Contact support