Banner Fallback

ADvantage now has the option to rely on a secondary SDK to retrieve a new AD in case the ad server does not deliver an appropriate ad to the client.

Info

This is a new feature, we are only supporting TeadsSDK for the moment.

CocoaPods Repository

  1. You add this command to your Podfile:
    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '12.0'
    use_frameworks!
    
    target '<Your Target Name>' do
        pod 'ADvantage'
        pod 'TeadsSDK'
        pod 'ADvantageAdaptors'
    end
    
  2. Then run Pod Install

Warning

To use the adaptor is necessary to have both ADvantageSDK and TeadsSDK in the project.

After you create a banner:

  • Create a new instance of the adaptor you want to use, eg.: ADvantageTeadsAdaptor, and pass to the banner the necessary information to use the fallback solution.

Important

Please ask our sales team (mailto:info@advantage-adsolution.com) for the Teads PID and contract first before you start using it. The provided PID in the example is for testing only.

Swift
adaptor = ADvantageTeadsAdaptor()
ad.fallBackAttributes = ["pid": 84242,
                         "pageUrl" : "https://example.com/article1",
                         "hasCMP" : false,
                         "usPrivacyStringCCPA" : "",
                         "subjectToGDPR" : "",
                         "consentGDPR" : ""]
Objective-c
self.adaptor = [[ADvantageTeadsAdaptor alloc] init];
[self.ad setFallBackAttributes:@{@"pid": @84242,
                                 @"pageUrl" : @"https://example.com/article1",
                                 @"hasCMP" : @NO,
                                 @"usPrivacyStringCCPA" : @"",
                                 @"subjectToGDPR" : @"",
                                 @"consentGDPR" : @""
}];
  • Placement ID (PID for short), is a value you need to get with Teads for your fallback banners.

  • The publisher http page url that matches the content where Teads Ad will be loaded into, more information use the link - Teads brand safety.

  • Consent management platform (CMP), is to tell Teads if your CMP is iAB compliant, for more information use the link -Teads CMP.

  • To validate your Teads banners you set the adaptor debug mode on, which will trigger the first step for validating it, check the rest of the steps on Teads site Validate Integration.

Swift
self.adaptor.debugEnabled = true
Objective-c
[self.adaptor setDebugEnabled:YES];

Tip

Only create one adaptor and banners can have different fallback attributes to show different.