Ad targeting in Adfox

In Adfox, targeting can be set up at different levels. Adding context data to the request can significantly enhance the quality of advertising and increase your revenue.

To use additional targetings, logical targeting, or keyword targeting for direct sales, implement passing the relevant parameter values in the ad request to Adfox.

Set up targeting

Determine which type of targeting is appropriate for your needs and implement passing the relevant parameter values:

Type of targeting

Parameter name

Description

Keyword targeting

adf_pk

Serve ad banners for select keywords. For example, you can insert search queries in the ad tag or set up targeting by names and interests, using your user base to more accurately identify the target audience.

To do this, insert parameters with values in adf_pk = value format into the ad tag's params object, where:

  • adf_pk is the parameter name.
  • value is the parameter value enclosed in single quotes. The value can contain:
    • Keywords: Up to 10 space-separated keywords.
    • Phrases: Only one phrase.

Not case sensitive. No value encoding is required.

For more information, see Adfox Help

Additional and logical targeting

adf_puidN

Serve ad banners based on additional targetings.

You can specify custom targeting values. For example, you can target only users with the test build or trigger banner impressions based on a specific internal metric.

To do this, pass the parameter with the values adf_puidN = value in the ad request to Adfox.

Steps for setting up additional targeting
  1. Create a dictionary for a targeting characteristic. The dictionary should contain a list of values:

    • The key is passed to the ad tag in the app.

    • The value is included in the targeting settings and can be toggled.

    In Adfox, you can add up to 63 custom dictionaries for your characteristics. Each dictionary can hold up to 10,000 values and can be updated with new key-value pairs as needed.

  2. Upload the dictionary for any free additional targeting characteristic through the Adfox interface.

  3. Implement passing the keys to the index of the characteristic for which you created the dictionary.

To use logical targeting, pass the values for the additional targetings from the app. In the Adfox interface, you can also set up ad campaign impressions using the AND/OR/NOT conditions.

For more information, see Adfox Help

IDs for debugging banners

adf_p1: Placement ID.

adf_pfc: Campaign ID.

adf_pfb: Banner ID.

Call a banner from a specific placement or campaign.

Warning

We recommend calling specific banners only for testing purposes. Otherwise, no other banners will appear on the placement.

To call a specific banner, pass two values: adf_p1 and adf_pfb. Banner, campaign, and placement IDs can be found in the Adfox interface.

Sample code (Ts)

let adRequest = new AdRequest({
        parameters: new Map<string, string>([['adf_puid1', 'XXX'], ['adf_puid2', 'XXX'],['adf_pk', 'XXX']]),
    });
Previous
Next