Meta Audience Network
The purpose of this documentation is to guide publishers who want to use the Nimbus Mediation SDK to request and load ads from Meta Audience Network via Nimbus Mediation.
The Nimbus SDK will automatically import the Meta Audience Network and handle injecting all the necessary parameters into the outgoing NimbusRequest after initialization.
Before getting started, follow the steps to create and setup your Meta account.
How it works
The SDK will automatically inject the bidder token and app id into the outbound request to Nimbus when using the `NimbusAdManager`. When the `NimbusFANRequestInterceptor` is initialized it will fetch the bidder token in the background for use on future requests and install the `NimbusFANAdRenderer` to render any wins from Meta.
Installation
Swift Package Manager
Following the steps defined in the integration section to install Nimbus using Swift Package Manager, include the package 'NimbusFANKit' in the selected packages.
CocoaPods
Add
NimbusRequestFANKit
andNimbusRenderFANKit
subspecs for the NimbusSDK declaration into your project’s Podfile.pod 'NimbusSDK', subspecs: ['NimbusKit', 'NimbusRequestFANKit', 'NimbusRenderFANKit']
Run
pod install
Meta Audience Network SDK will be automatically installed when using CocoaPods
Manual Installation
Include source files for NimbusRequestFANKit
and NimbusRenderFANKit
under NimbusFAN/
directory.
Data Privacy
Meta has instructions for setting up Data Processing Options prior to Nimbus's initialization. Please refer to this link to set it up.
Configure the SDK to include Meta Audience Network
Be sure Nimbus is initialized before continuing with the Meta Audience Network integration.
If importing Nimbus via CocoaPods, use:
If importing Nimbus manually, use:
Include the Meta Audience Network interceptor and renderer.
Requesting Meta Audience Network Ads
Meta Audience Network ads are automatically included in the auction if the NimbusFANRequestInterceptor has been initialized and placement ids for Meta Audience Network have been setup in Nimbus.
iOS 14+
Set advertising tracking explicitly for Meta Audience Network as necessary.
Banner and Native
Meta Audience Network banner and native units can be embedded in a layout and must use the following call:
Interstitial and Rewarded video
Meta Audience Network interstitial and rewarded video ads are full screen takeovers and must use the following call:
Customize Meta Audience Network rendering (Optional)
The rendering can be customized by attaching a custom UIView
that includes all the necessary Meta Audience Network subviews. More information can be found here.
Testing Meta Audience Network integration
To test the integration, follow the steps from this guide to set up a device for receiving test integrations. Not required for simulators.
The SDK integration can be tested by forcing a test Meta Audience Network ad.
Please remember to turn testMode and forceTestAd OFF for production
Please work with your Nimbus account manager to ensure the placements have been added to the Nimbus dashboard and are not paused.
After completing the steps above, your app will be ready to start showing Facebook Ads in your app.
Last updated