Overriding the Ad Tag URL on iOS
If you need a value for your base Google IMA ad tag URL that is different than the value defined in Backlot, use the adUrlOverride function, as shown in the following example. Consider:
- You must override before you set the video identifier with setEmbedCode.
- The example below does not show a complete, valid ad tag URL value.
- After the special case URL, be sure to nullify the override, as shown below.
- More details about adUrlOverride are in the reference documentation in the SDK package.
. . . // To override the ad URL, do this *before* setting the embed code: _adsManager.adUrlOverride = @"http://pubads.g.doubleclick.net/gampad/ads?sz=640x480..."; . . set the embed code . // Remember to 'nil' it out later if need be: As long as it is non-null, the value will override any IMA settings from Backlot. _adsManager.adUrlOverride = nil; . . .