Set up custom targeting with key values

Note: This topic only applies to the IX Library™. For more information on setting up key values in Prebid.js, see Prebid's documentation on Setting First-Party Data (FPD).

Before you begin:

  • You must be integrated with the IX Custom Library™ or IX Wrapper Library™.
  • Review our list of certified adapters and determine which partners you want to send first-party data to. Consult with your account team to determine if the partners you want to send custom targeting to support this feature. If a partner you want to work with does not support key values, we recommend reaching out to them and requesting support.

  1. Depending on the type of data that you want to share, create your key values using the following API methods and pass the site or user object:
    APITargeting typeExample

    setSiteKeyValueData(data)

    Allows you to pass first-party site data. For more information, see the IX Library API reference.

    Click here to see an example.

    setUserKeyValueData(data)

    Allows you to pass first-party audience data. For more information, see the IX Library API reference.

    Click here to see an example.

  2. Place the key values code before the piece of code that initiates the header auction:
    • If you're using the IX Wrapper Library, place the code before each googletag.display or googletag.pubads.refresh() call.
    • If you're using the IX Custom Library, place the code before each retrieveDemand or retrieveVideoDemand API call.

After you finish: Optionally, if you want to set up key values targeting for deals, see Set up key values targeting in deals.