If you use a third-party ad server with Google Ad Manager server-side ad insertion (SSAI), IMA supports monetizing additional inventory through Google Ad Manager by sending an encrypted nonce through the third-party ad server to Ad Manager. This guide shows how to send these signals using the IMA SDK.
This guide uses an example ad tag:
https://youradserver.com
.
You need to update the ad tag to work with your actual ad servers.
Prerequisites
IMA HTML5 SDK v3.523.0 or higher.
Complete the Get started guide.
1. Configure your app to send a nonce to Google's DAI servers
Set enableNonce
to true
to have the IMA DAI SDK send an encrypted nonce to
DAI servers.
const streamRequest = new LiveStreamRequest();
streamRequest.enableNonce = true;
2. Update ad tag with a macro to populate the nonce
Add the macro [GOOGLE_INSTREAM_VIDEO_NONCE]
to your ad server's tag in the Ad
Manager UI. When the DAI server populates the ad breaks with your third-party ad
server URLs, Ad Manager will dynamically populate the macro with the encrypted
nonce. The result should look similar to the following sample ad tag, which uses
a key that must be configured on the third-party server:
https://youradserver.com?ad_manager_nonce=[GOOGLE_INSTREAM_VIDEO_NONCE]
This ad tag uses ad_manager_nonce
as an example key, but you'll need to
confirm with your third-party ad server on how it accepts the nonce value.
To update your ad server's tag in Ad Manager, go to Video > Livestreams and select an active livestream or create a new one.
Now, add the macro to the ad tag configured within the selected stream. Set the tag in Ad Break Settings > Master Ad Tag.
3. Configure the third-party ad server's request for Ad Manager
Configure your third-party ad server to include the nonce in the server's request to Ad Manager. Here's an example of an ad tag configured inside of the third-party ad server:
https://pubads.g.doubleclick.net/gampad/ads?givn=%%custom_key_for_google_nonce%%&iu=/21775744923/external/single_ad_samples&sz=640x480
Ad Manager looks for givn=
to identify the nonce value. The third-party ad
server will need to support some macro of its own, such as
%%custom_key_for_google_nonce%%
, and replace it with the nonce query parameter
you provided in the previous step. More information on how to accomplish this
should be available in the third-party ad server's documentation.
That's it! You should now have the nonce parameter propagated from the IMA DAI SDK through the DAI server, to the third-party ad server, and back to Ad Manager. This enables better monetization through Google Ad Manager.