Profile defines a collection of inventory units that have the same configuration settings.

A website’s homepage may have different requirements than its subpages based on user behavior. Users tend to spend little time on a home page of a site, instead, they use it to transition to other subpages where they spend more time digesting content. This may result in different latency requirements for the home page than its subpages. You can configure separate profiles in PubMatic to optimize different latency requirements. 

In the Profile Management tab you can:

 Instructions for all are detailed below.

Create a profile

Add a new profile to OpenWrap when you have a collection of inventory that shares similar configuration settings. Follow these steps to create a new profile. 

  1. Login to the PubMatic UI portal with your account credentials. If you're unsure of your account credentials, contact your account manager for assistance.
  2. From the main navigation, select Inventory > OpenWrap > Profile Management. Click Create Profile
  3. Select OpenWrap (or, create an Identity profile). 

  4. Enter a Profile Name and select the Platform type for this profile. 

  5. Follow the platform-specific instructions below:

Select Web for all content types on the web, including video.

Select Mobile In-App when using the OpenWrap in-app SDK.



  1. Select your AdServer. OpenWrap supports GAM (formerly DFP) and Custom ad servers.
  2. Select a Release Version from the menu. The options are:

    • Stable releases go through planned release cycles and testing. 

    • Nightly releases are purpose-oriented versions of PubMatic's wrapper, such as the inclusion of a requested feature or adapter. Nightly releases must be deployed in accordance with our documentation and consultation with a PubMatic solutions engineer, as needed.

  3. Select your partners. PubMatic always appears by default for Partners. If you want to add more partners, select from the list and click Done.


    Set the following:
    • The Auction Timeout (ms) is the time in milliseconds that the ad server will wait for a response before the auction times out. Choose a high number (for example, 10,000 ms or more), if you want to wait to load ads until the user has had a chance to interact with the consent management platform during the first visit to your site.
    • Change the Traffic Allocation (%) for your selected partners if you want something lower than the default of 100%.
    • Set the Bid Adjustment (%) for partners that require a revenue share. For example, if a partner charges 15% revenue share, the  Bid Adjustment (%)  field should be 15. Use a negative number to boost the bid.
    • You need to select a Path for PubMatic. Partners enabled for Server-side support will have all their bids sent via the server-to-server path.
  4. If you enable Identity Module, select Identity Partners from the menu. For more information, see Identity Solutions.


  5. If your ad will serve in a region the requires GDPR and/or CCPA, enable the Consent Management accordingly, otherwise skip to step 6.

    OpenWrap supports only Consent Management Platforms (CMPs) that are compliant with: IAB Consent Management Provider JavaScript API v1.1 or IAB Consent Management Platform API v2.0.

    If you enabled GDPR:

      • Choose your preferred consent management API from the CMP API dropdown menu.

      • In the Timeout (ms) field, enter the number of milliseconds you would like the Consent Management platform to wait for the consent before proceeding. If the timeout value you set here is higher than the partner timeout in step 6, then in the absence of consent, the ad server could potentially proceed without partner bids.

      • Auction on CMP Failure controls whether to proceed with the auction if the call to the Consent Management Platform fails. This option is only supported for CMPs supporting Transparency and Consent Framework (TCF) v1.1. Prebid v4.0 and later defaults to TCF v2.0 and thus when consent management is enabled, if the CMP is missing on the page or otherwise fails to respond, all OpenWrap auctions will be cancelled regardless of the Auction on CMP Failure setting.
    1. If you enabled CCPA:

      • Choose your preferred consent management API from the CMP API menu.

      • In the Timeout (ms) field, enter the number of milliseconds you would like the Consent Management platform platform to wait for the consent before proceeding. If the timeout value you set here is higher than the partner timeout in step 6, then in the absence of consent, the ad server could potentially proceed without partner bids.

  6. Advanced settings:

    • Enable Send All Bids if you want to send additional key values to the ad server with bid information for every bidder.
      • This feature is only supported when using a GAM ad server.

      • If you want to enable bid landscape or per partner reporting, you must enable Send All Bids.

      • If you wants to provide priority to PMP bids, you must enable Send All Bids.

      • When Send All Bids is selected, OpenWrap still sets the OpenWrap key values for the winning bid in addition to the per-bidder key value

    • Enable Currency Conversion if you want the ad server to convert currency. Select AdServer Currency from the menu.

    • For more information on Targeting Keys, see OpenWrap In-App OTT.
    • Enable Use Prebid Analytics if you want to use the Prebid PubMatic Analytics Adapter. See Prebid.js Bidder Params. If you enable Use Prebid Analytics, then Optimized Multi-size Ad slots is automatically enabled.
    • Enable Optimized Multi-size Ad slots to create a single impression for all sizes of an ad slot. Disabling it will create a separate impression for each size of the ad slot. PubMatic recommends enabling this setting. This setting is automatically enabled if you enable Use Prebid Analytics.

7. The Custom Scripts feature allows you to customize the behavior of OpenWrap without having to manually put code on your page. The Custom Scripts code will be executed prior to PWT.jsLoaded(). A use-case for using custom scripts would be if you want to set Prebid options in the custom script using owpbjs.setConfig().

Incorrect custom code can break an OpenWrap profile and prevent monetization.  It's especially important to make sure the custom code has no syntax errors.  Always push new or changed to custom code to staging and then thoroughly test the code before pushing that live.

8. Choose  Save . The  Status column will display:  DRAFT (Mapping Pending) . When you're ready to map the ad units, continue to Map ad units below.


To use OpenWrap with AMP pages see  OpenWrap AMP Support.


The process of defining a video ad in OpenWrap is to create a profile and generate an ad tag as you normally would in GAM, then append video-specific parameters to the tag. Following these steps to create your profile:

  1. Select your AdServer. OpenWrap supports GAM (formerly DFP) for OTT/CTV.

  2. Select your partners. PubMatic always appears by default for Partners. If you want to add more partners, select from the list and click Done.
    Set the following:
    • The Auction Timeout (ms) is the time in milliseconds that the ad server will wait for a response before the auction times out. Choose a high number (for example, 10,000 ms or more), if you want to wait to load ads until the user has had a chance to interact with the consent management platform during the first visit to your site.
    • Change the Traffic Allocation (%) for your selected partners if you want something lower than the default of 100%.
    • Set the Bid Adjustment (%) for partners that require a revenue share. For example, if a partner charges 15% revenue share, the Bid Adjustment (%) field should be 15. Use a negative number to boost the bid.
    • The Path for for OTT/CTV is defaulted to Server-side, which means all bids will be sent via server-to-server.

3. Advanced setting:

  • Enable Send All Bids if you want to send additional key values to the ad server with bid information for every bidder.

    • If you want to enable bid landscape or per partner reporting, you must enable Send All Bids.

    • If you wants to provide priority to PMP bids, you must enable Send All Bids.

    • When Send All Bids is selected, OpenWrap still sets the OpenWrap key values for the winning bid in addition to the per-bidder key value

4. Choose Save. You will be redirected to Profile Details page. When you're ready to map the ad units, continue to Map ad units below.


See OpenWrap Mobile In-App Support for details about creating mobile in-app OpenWrap profiles and mapping ad units.


Manage a profile

Map ad units

After adding a new profile or creating a new profile version with additional partners, you need to create and upload a mapping file for each partner. The mapping process allows the wrapper tag to include a partner-specific identifier that allows each partner to understand which ad unit is generating the impression (for example, PubMatic requires a site id and ad tag id in the ad call). Partners use this information to apply various settings in their own platform, such as floor price, demand sources, and so on.

You must escape the ad unit name using straight double quotes (for example, "adunit1,adunit2"). Use a simple text editor to add the quotes, because Excel doesn't always add escape characters to a CSV file in the correct format.

  1. In the OpenWrap page, go to the Profile Management tab > choose the profile from the Select Profile drop-down menu > click the Actions menu to the left of the Version you want to map the ad units for > select Mad Ad Units.
  2. Select the template type from the menu. 
  3. In the Actions column, select Download Template. Templates are CSV files, and each template is specific to the template type you've chosen.
  4. Complete the template then go back to the Actions column and select Upload Mapping

It is best practice to keep the file size to 500kb or less. If the file size does exceed this threshold, a warning "!" may appear to indicate that the size may cause latency, however, monetization is not affected. You may split partner mappings across multiple profiles to reduce the file size.  

Template types

A mapping file needs to be uploaded for each partner. The template type below refers to the on-page information that the wrapper looks for in runtime and then maps to the partner-specific ids uploaded in the mapping file. There are several template type choices below as mentioned.

Template Type

Details

Ad Unit Name + Size

The AD Unit Code of the slot defined for GPT; for example, /12345/Adunit1/Adunit2/

Size will be Width x Height

Div ID + Size

The Div ID on the page

Size is specified as Width x Height

SizeMapping is only for sizes; that is, for a particular size across all inventory, the same partner tag id/ad unit will be called.
Regex

Regex matching allows publisher to have one mapping apply to multiple ad units or divs, which eliminates the need to map every ad unit or div individually.

Regex mapping

Regex matching allows publishers to group mappings, which eliminates the need to explicitly mention a partner-specific identifier for each ad unit or div. So if you have two ad unit names on a page and you want to map both of them to same AppNexus placement ID or same PubMatic ad tag, you can use a Regex expression to group these two ad units.

To group AdUnit1 and AdUnit2:

Use the Regex expression: ^(AdUnit)(1|2)

The result is a single entry for AdUnit1 and AdUnit2 

Regex is supported for Display, In-App & AMP profiles:

While OpenWrap supports the full set of regular expressions, we recommend against using very complex Regex structures such back references, lookahead & lookbehind.

To learn more about building regular expressions:
 https://medium.com/tech-tajawal/regular-expressions-the-last-guide-6800283ac034

Ad unit configuration

OpenWrap allows you to manage ad unit configuration for a profile. Ad unit configuration is available for Display (including Native), In-app, ad Video platforms. For more information, refer to VAST bidder tag management documentation.

Synchronous and asynchronous tags

OpenWrap provides options to generate both synchronous and asynchronous wrapper tags. Synchronous and asynchronous tags determine how the wrapper (and not the underlying header tags), loads on the page.

In the synchronous version, the publisher doesn’t have to delay gpt.js load explicitly to ensure pubmatic pwt.js loads before it (pwt.js still needs to load before gpt.js)

All partner calls occur asynchronously in parallel.

On-page Integration

  1. Select DFP for the Ad Server Type.
  2. Select either Synchronous or Asynchronous for Wrapper Tag Type.
  3. Copy the code from the editable portion of the Document Layout section.
  4. Paste the code into the <head> section of the relevant pages or tag management solution.