OpenWrap User Guide

OpenWrap simplifies header tag integration and post-integration management for publishers. OpenWrap provides a transparent enterprise wrapper solution for Prebid to publishers who want to increase monetization with access to the broadest set of exchanges and unique demand. OpenWrap simplifies partner management with hybrid client-side and sever-to-server management capabilities in an intuitive UI, with enterprise-grade analytics and a dedicated team for account optimization and support.

This guide describes key features and functions of OpenWrap and step-by-step instructions to use configurable controls and generate wrapper tags.

Glossary of terms

Client-sideThe user's web browser (the client) sends ad requests directly to partners. Client-side request processing has the highest user match rate but can slow web page loading.
PartnersSSP/Exchanges whose header tag is included in the wrapper.
ProfileDefines inventory for the wrapper. Includes configuration settings for the OpenWrap.
Server-sideAd requests go first to an OpenWrap server, which then sends them to partners. Server-side request processing can speed web page loading but can reduce user match rate compared to client-side processing.
VersionA version of a profile. Refers to the settings included in the profile. One profile can include multiple versions (only one can be the live version in production).
Wrapper TagJavaScript (JS) code that includes multiple header tags, in addition to configuration, management, and analytics code. 


OpenWrap key features and functions

PubMatic OpenWrap:

  • Provides a transparent enterprise wrapper solution for Prebid with GAM as a publisher ad server.

  • Simplifies partner management with hybrid client-side and server-to-server management capabilities in an intuitive UI with enterprise-grade analytics.

  • Contains multiple underlying header tags. The wrapper tag ensures that header tags can run concurrently.

  • Auto-detects ad units on a page. OpenWrap collects the necessary identifiers such as unit name, div ID, and size to send partner-specific identifiers. 

    Example: PubMatic requires ad unit name and ad size to identify the ad opportunity. This removes the burden on your engineering team to collect, map, and maintain all the ad unit identification data on a partner-by-partner basis for every page.

  • Provides an ad unit to partner-specific identifier mapping interface.

  • Offers the ability to configure controls such as traffic allocation, bid adjustment, and timeout values.

  • Handles decisioning on page, then passes the partner’s information and the winning bid to the Ad server.

  • Creates line items in the publishers’ ad server.

  • Delivers critical insights with analytics. Analytics include volume-related, monetization-related, and latency-related metrics.

Publisher requirements 

Using PubMatic OpenWrap requires the following:

  1. Access to web pages that will include the wrapper.

  2. Define inventory groups of less than 500 ad units per group. Configure each inventory group in a separate profile.

  3. Ad Unit Mapping:

    • Identify all ad units with ad unit names, div IDs, and ad sizes. Enter this information in the mapping file format for each partner (you'll find the file format in the Actions drop-down  menu for a specific profile within the OpenWrap Profile Management tab (learn more).

    • Register those ad units with each partner you want to work with, and get a unique ID from each partner. For example, provide ad unit name and size to your PubMatic contact and in return receive corresponding site id and ad tag id.

    • Inspect the contents of the file to make sure it is complete.

  4. Access to Ad server: Provide trafficker level access to the PubMatic team to assist with creating line items in the ad server. This is required if the publisher's ad server is GAM.

Getting started

Use the instructions in this section to configure OpenWrap. 

DFP is now called, Google Ad Manager (GAM)…

When you see DFP mentioned in this guide, it is referring to GAM. This will be updated in the Publisher UI in an upcoming release.

Log in and navigate to OpenWrap

  1. Select Inventory > OpenWrap. There are three OpenWrap tabs:

    • Partner Management: Add a new partner. 

    • Profile Management: Create a new profile or manage an existing profile. 

    • Tag Management: Retrieve wrapper tags for a selected profile.

     

Add a partner

Before you edit profiles and generate tags, you must first add them in the Partner Management tab.

  1. From the Partner Management tab, choose Add Partner.
  2. Choose Bidder. See Identity Solutions for instructions on setting up Identity Hub.
  3. Select a partner from the Partner menu.
  4. Enter an Account Name (if you have multiple accounts with a partner, use a naming convention that will help you identify each partner account).
  5. Add the required information for each partner (for example, HostAccount AliasDomainNetwork ID, and so on—obtain this information from your partner if you don't already have it).
  6. Choose Save.

Edit a partner

Follow these steps to edit account-level information. 

  1. From the Partner Management tab, click the Actions menu next to the partner name.
  2. Make your edits and and choose Save.

Profile management

Profiles define groups of inventory that use the same configuration settings. Manage your profiles in the Profile Management tab. See OpenWrap Profile Management for details.

If you want to use OpenWrap with AMP pages see OpenWrap AMP Support.

Post-integration configuration changes

OpenWrap makes it easy to change most settings. For example:

  • Add or remove a partner from a Profile.
  • Update Mapping.
  • Throttle traffic to an existing partner.
  • Update Bid Adjustment share amount.
  • Change timeout settings.
  • Change whether a partner who supports server-to-server will run client-side or server-side.

Add a new profile version

  1. Select the Profile Management tab.
  2. Select a profile from the Select Profile drop-down list.
  3. Choose Actions > Create New Version next to the most recent version.

    One of two different styles of the Edit Profile dialog will display. Use the instructions below for the Edit Profile dialog that matches your configuration:

    • Partners who support client-side wrapper. 
    • Partners who support server-side wrapper.

Client-side partner profiles

  1. Make changes to the Traffic AllocationBid Adjustment, and Timeout (ms) fields.

    If you are using Display platform and DFP or CUSTOM as AdServer, use the Currency Conversion (avoid bid adjustment for currency conversion). Select a base currency to allow normalising all bids to this base currency for auction in OpenWrap. With currency conversion feature, DFP will get the winning bid value in the currency selected for OpenWrap profile.

    If you are using any other platform like AMP, Video, or In-App, enter a suitable value in the Bid Adjustment field to adjust for currency conversion so that all responses can be compared in USD.
    Also note that positive bid adjustment value reduces the bid, whereas negative value boosts it.

    Continue to the Add or Remove Partners section below.

Server-Side Partner Profiles

  1. Make changes to the Traffic AllocationBid Adjustment, and Timeout (ms) fields. Additionally, also check the  Server-Side box for each partner that you want to run server-side. Leave the Server-Side box unchecked for any partners that you want to continue to run client-side.

    If you are using Display platform and DFP or CUSTOM as AdServer, use the Currency Conversion (avoid bid adjustment for currency conversion). Select a base currency to allow normalising all bids to this base currency for auction in OpenWrap. With currency conversion feature, DFP will get the winning bid value in the currency selected for OpenWrap profile.

    If you are using any other platform like AMP, Video, or In-App, enter a suitable value in the Bid Adjustment field to adjust for currency conversion so that all responses can be compared in USD.
    Also note that positive bid adjustment value reduces the bid, whereas negative value boosts it.


    If all partners in the profile are configured as server-side, make sure at least one of them has timeout more than 500 ms (preferably 100 ms or more) to account for network round trip from user browser to server-side wrapper component. Even if the timeout is more than 500, server-side component would cap the timeout for outbound bid requests to 500 ms.
    Continue to the Add or Remove Partners section below.

Add or Remove Partners

  1. Add or remove partners if required by using the Select Partners drop-down (shown below).

Ad Server

  1. Select AdServer, then choose either DFP  or CUSTOM from the list.

Release Version

Select the OpenWrap build version that will generate OpenWrap code for your profile.

  • Use the STABLE version if you are not sure of what this is.
  • Use  NIGHTLY  code builds  only  with the assistance of the PubMatic Ops team.

Send All Bids

Select Send All Bids if you don't want the wrapper to conduct the auction and send bids from all configured partners directly to DFP (GAM).

This feature is available only when…

Ad Server is DFP.

Currency Conversion

  1. Select Enable to ensure partner bids in other currencies are converted to USD.
  2. Select USD from the AdServer Currency dropdown to use as your base currency.

    This feature is available only when…

    Platform is Display and Ad Server is DFP or CUSTOM.

Consent Management for GDPR

Enable consent management if this profile is going to get traffic from European regions regulated by  GDPR. 

See OpenWrap Profile Management for more details around all configuration related to consent management.
When you have finalized all settings and have completed mappings as mentioned earlier in this guide, you will have a new DRAFT version.

Testing Your Draft Version

  1. To start testing the next version, push the draft version to staging by selecting Push to Staging. The Status of the version then updates to,  STAGING.

    The update may take 15-30 seconds.


    Do not select Push to Production until the new version has been tested.

    In order to test, select Actions > Debug URL, to append to your page URL where the new version is expected to run.

    A debug URL looks like this:

    ?pwtv=1&pwtvc=1

    For example: a publisher who is running version 1 on yourdomain.com, would test Version 2 using this URL:

    yourdomain.com/?pwtv=1&pwtvc=1
  2. Once testing in complete, select Actions > Push to Production. This replaces the active version (previous production version), with the new version.

    No on-page changes are required when you create a new version for the same profile.

    IMPORTANT

    Each profile can have only one active version running in production. It may take 5-10 minutes to reflect the change.

Private Marketplace-Guaranteed (PMP-G) Support

Please refer to PMP-Guaranteed Implementation Guide for Publishers to understand how PubMatic supports PMP-G. 

SafeFrames (Only for DFP Ad Server in OpenWrap)

Publishers using PubMatic’s OpenWrap have the opportunity to place the creative script in a SafeFrame instead of a standard Friendly iframe. Using a Friendly iframe, the ad server renders the content into a SafeFrame on the same server as the host content. But a SafeFrame is a managed, API-enabled iframe that communicates between the publisher page content and the ad rendered in the iframe. This lets SafeFrame collect data and provide rich interaction (such as ad expansion), that is unavailable with a standard iframe.

Create SafeFrame Line Items in  DFP (GAM)

  1. Navigate to the Creative Settings for a line item and enter the appropriate creative script. 

    There are different methods for rendering creatives for PMP bids and Open Market bids. Use the appropriate, related script below.


    SafeFrame for Rendering PMP Bids:

    <script src="//ads.pubmatic.com/AdServer/js/pwt/%%PATTERN:pwtpubid%%/
    \%%PATTERN:pwtprofid%%/%%PATTERN:pwtverid%%/pwt.js">
    </script>
    
    <script type='text/javascript'>
    	(function() {
    		try {
    window.PWT.sfDisplayPMPCreative(document, '%%PATTERN:pwtdeal_pubmatic%%', []);
    		} catch (e) {}
    	})();
    </script>


    SafeFrame for Rendering Open Auction Bids:

    <script src="//ads.pubmatic.com/AdServer/js/pwt/%%PATTERN:pwtpubid%%/%%PATTERN:
    pwtprofid%%/%%PATTERN:pwtverid%%/pwt.js">
    </script>
    
    <script type='text/javascript'>
        (function() {
            try {
                window.PWT.sfDisplayCreative(document, '%%PATTERN:pwtsid%%');
            } catch (e) {}
        })();
    </script>
  2. Select the checkbox, Serve into a SafeFrame.
  3. Complete any other fields required, then choose Save.

SafeFrame Scenario and Results

Scenario

Result

Inside GAM, SafeFrame creative code added but the SafeFrame option is not selected.

Creative rendered correctly if it does not use SafeFrame feature. For example, a static image creative renders correctly but an expandable creative that relies on SafeFrame will not work correctly.

Inside GAM, legacy/regular pwt creative code added, SafeFrame option selected and SafeFrame creative rendered.

Error seen on browser console. Creative is rendered but if it is rich media creative/expandable then it will not work as expected.

Display non-compatible expandable creative inside SafeFrame

Creative does not render correctly or post creative expansion results into page error or unknown behavior.

Display SafeFrame creative inside a non-SafeFrame

Error seen on the browser console. Creative is rendered but if it is rich media creative/expandable then it will not work as expected.

SafeFrames…

Any creative to be rendered inside a SafeFrame must be SafeFrame compatible and must be tested on the page.

Limitations

  • As creative will render in a SafeFrame, partner creative might report URL mismatch in data gathered during creative rendering.
  • Any creative taking benefit of friendly frames will not be able to do so in SafeFrame.
  • Partners may not know in advance that the creative will render in SafeFrame, so the partner must input a parameter to be notified about the SafeFrame.
  • We will try to render creative by creating a friendly frame in a SafeFrame. We will use synchronous rendering in IE and Safari if a friendly frame creative fails in a SafeFrame. When we use synchronous rendering in SafeFrame, any creative taking advantage of SafeFrame will not work.

References

To learn more about SafeFrames see: 

Known Limitations

The following sections describe the current known limitations of OpenWrap.

Post-timeout bids

  • Currently, the default bid (db) flag is set only if the partner endpoint returns an error (internal server error, not found, and so on) or times out (it will not be set to 1).

Code Generation Performance

Below is the performance of code generation with gulp execution through the API with varying the number of adapter partners.


Number of PartnersTime to Execute
118-20 seconds
1025-30 seconds


This has an impact on flow, user flows and API calls:

  • Copying profile
  • Push wrapper code to staging
  • Mapping upload

SafeFrame

Expandable creatives do not work correctly after rendering inside of a SafeFrame on Safari, IE11/Edge.

Support for Previous Code Build

When a stable code build of OpenWrap (with Prebid) is released, we will not support prior code builds. All subsequent OpenWrap profile versions will use the new stable code build.

Support for Video on Server Side

For display profile in OpenWrap, currently we don't support server side partners for video inventory.

⇧ Top

Do you have feedback on this document? Let us know: email us.

Table of Contents