OpenWrap Profile Management

Document created by pubmatic-archivist on Mar 27, 2017Last modified by catherine.racette on Oct 23, 2017
Version 6Show Document
  • View in full screen mode

OpenWrap Profile Management

A Profile defines groups of inventory units that will have same configuration settings.

Example: A website’s home page 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. Two separate profiles can be set up in PubMatic to configure and apply each latency requirement. 

From the Profile Management tab you can:

  • create a profile.
  • create a new version of an existing profile.

Creating a Profile

Create a profile when you have a group of inventory to add to OpenWrap that will have similar configuration settings.


  1. Select the Profile Management tab.
  2. Click Create Profile.
  3. Enter a Profile Name and Comment.
  4. Select the release version. There are two types of releases (Stable and Nightly). Stable releases go through planned release cycles and testing. Nightly releases are used to release features as soon as possible without going through PubMatic’ release cycles.

    Note: OpenWrap with Prebid is going to be available initially as a nightly release “ExtPrebid_v6.1.0_NIGHTLY” before it is merged with the Master branch and released as a Stable version.

  5. Select the partners that apply to this profile. PubMatic will appear by default; to select additional partners, click each name and click Done.
  6. Configure the following for each partner:
  • Traffic Allocation (%): Total percentage of traffic that will be exposed to that partner.
  • Bid Adjustment: Enter as a percentage only if the partner is returning gross bids. For partners returning net bids, this value should be set to 0. The partners’ bid will be reduced by the % mentioned here for comparing with other partners, to be able to compare net bids from all bidders.
  • Timeout: Enter in milliseconds. (Recommended starting value is 1000ms.) The highest timeout entered for any partner is used as the global timeout currently.
  • Bid Pass Through: Only select the checkbox if a partner has requested not to have the PubMatic Wrapper read their bid or conduct an auction. Selecting this option is NOT recommended, however it is available if required.
    Note that enabling bid pass through for a partner requires that you create additional line items for that partner on your ad server and partner performance metrics will not be available in analytics.
    If you choose Bid Pass Through, a warning will appear:

  1. Click Save.
    Status will display 'DRAFT (Mapping Pending).' Continue with the 'Mapping Ad Units' section.

OpenWrap Integrated with Prebid


Default Prebid Settings

  • Namespace: window.pbjs
  • Bidder Sequence: random
  • Logging: false


Prebid APIs Used

  • window.pbjs.setBidderSequence("random");
  • window.pbjs.logging = false;
    adUnits: adUnitsArray,
    bidsBackHandler: function(bidResponses) {
        refThis.handleBidResponses(bidResponses); // function defined in OpenWrap code
    timeout: CONFIG.getTimeout()-50 // The timeout passed to PreBid code is 50 ms lesser than what is set in OpenWrap code


Managing a Profile

  1. Select the Profile Management tab.
  2. Select a profile from the menu.

  3. Choose an option form the Actions menu based on the action you want to perform.

Mapping Ad Units

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

A mapping file needs to be uploaded for each partner. 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


Ad Unit Name + Size                             

The AD Unit Code of the slot defined for GPT (e.g., /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

Div IDOnly Div ID (PubMatic header tag always requires size, therefore this option is not available)
SizeMapping is only for sizes; i.e., for a particular size across all inventory, the same partner tag id/ad unit will be called.


Create and Upload Partner Mapping

  1. Select a profile in the Profile Management tab. 
  2. Select Actions | Map Ad Units next to the version labeled DRAFT (Mapping Pending)
  3. Select the appropriate type for the partner. (Must be done before downloading a template.)

  4. Select Actions | Download a Template.

    Note: Column order may change after the OpenWrap with Prebid release. Any templates or mappings downloaded for profile versions before the OpenWrap + Prebid release should not be used subsequently.

  5. Complete the fields in the downloaded template, gathering necessary information from the partner.
  6. Once the template is completed, from the Profile Management tab select the appropriate partner.
  7. Select Actions | Map Ad Units.
  8. Select the same Template Type selected earlier in the process and select Actions | Upload Mapping.
  9. Repeat for all partners and click Close.
    The Status should now display only DRAFT and you are now ready to begin testing

Generate Tag and Verify Staging

When you have uploaded the mapping for a partner, you can move to the next step, which is generate and test the tag(s).

  1. Select a profile in the Profile Management tab.
  2. Select Actions | Push to Staging. The Status will change to STAGING.
  3. Select the Tag Management tab to generate a tag for use in testing. (See guidelines below for generating a tag.)

Generate Tags

After you have completed the partner mapping and have pushed the profile to staging (see above for instructions), you are ready to generate a tag for testing (staging). Additionally, after testing is complete and you are ready to move to production, you just need to push the staging version to production. 

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) is loaded on the page.


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


All the partner calls are made asynchronously in parallel.



On-Page Integration

  1. Select either Synchronous or Asynchronous.
  2. Copy code from the editable portion of the code.
  3. Paste code in header section of the relevant pages or tag management solution.