Set Targeting for GPT Async
Set query string targeting on all GPT ad units. The logic for deciding query strings is described in the section Configure AdServer Targeting. Note that this function has to be called after all ad units on page are defined.
pbjs.setTargetingForGPTAsync([codeArr]);
Arguments:
  • debug: boolean

    Boolean to indicate if debugging is turned on or off.

    Accepted Values
    Field Scope Typw Description
    [codeArr] Optional Array An array of adUnitCodes to set targeting for.
Response
  • param1: string

    String indicating some value that has to be passed as a string type.

  • param2: number

    Number indicating some value that has to be passed as a number type.

    Note: This number should be between 0 and infinity.
Response Description
{ response: example }