Page Summary
-
This guide explains how to integrate Meta Audience Network ads using Google Mobile Ads SDK and AdMob Mediation for iOS apps, focusing on bidding.
-
Meta Audience Network supports bidding integration and various ad formats including Banner, Interstitial, Rewarded, Rewarded Interstitial, and Native ads.
-
Essential requirements include the latest Google Mobile Ads SDK and a compatible Meta Audience Network adapter and SDK.
-
The process involves setting up configurations in the Meta Audience Network UI, configuring mediation settings in the AdMob UI, importing the necessary SDKs and adapter, implementing privacy settings, and adding required code.
-
Testing with test ads on a registered device and verifying with single ad source testing is crucial before releasing the app.
This guide shows you how to use Google Mobile Ads SDK to load and display ads from Meta Audience Network using AdMob Mediation , covering bidding integrations. It covers how to add Meta Audience Network to an ad unit's mediation configuration, and how to integrate the Meta Audience Network SDK and adapter into an iOS app.
Supported integrations and ad formats
The mediation adapter for Meta Audience Network has the following capabilities:
1 Meta Audience Network became bidding only in 2021.
Requirements
-
Latest Google Mobile Ads SDK .
-
Complete the mediation Get started guide .
-
iOS deployment target of 13.0 or higher
-
Meta Audience Network adapter 5.10.0.0 or higher ( latest version recommended )
-
The latest Meta Audience Network SDK usually requires the latest version of Xcode
Step 1: Set up configurations in Meta Audience Network UI
Sign up and log in to the Business Manager Start page .
Click Get startedthen Create new account.

Fill out the required fields with your business details and click Next.

Create a property
After you've filled out the required information, you're prompted to create a property for your app. Enter the desired name of the property for your app and click Next.

Next, select your platform to monetize.

Add your app details and click Next.

Set up your payment account by clicking Add a new payment account. You will be redirected to a new page to enter your payment information. Fill out the necessary details, then click Next.

Select Google AdMobas the Mediation platform, then click Create placement.

Select a format, fill out the form and click Create.

Take note of the Placement ID.

Click Done.
Update your app-ads.txt
Authorized Sellers for Apps app-ads.txt
is an IAB Tech Lab initiative that helps ensure your
app ad inventory is only sold through channels you've identified as authorized. To prevent a
significant loss in ad revenue, you'll need to implement an app-ads.txt
file.
If you haven't done so already, set up an app-ads.txt file for your app
.
To implement app-ads.txt
for Meta Audience Network, see Identifying Authorized Sellers with app-ads.txt
.
Turn on test mode
See the Testing Audience Network Implementation guide for detailed instructions on how to enable Meta Audience Network test ads.
Step 2: Set up Meta Audience Network demand in AdMob UI
Configure mediation settings for your ad unit
You need to add Meta Audience Network to the mediation configuration for your ad unit.
First, sign in to your AdMob account . Next, navigate to the Mediationtab. If you have an existing mediation group you'd like to modify, click the name of that mediation group to edit it, and skip ahead to Add Meta Audience Network as an ad source .
To create a new mediation group, select Create Mediation Group.

Enter your ad format and platform, then click Continue.

Give your mediation group a name, and select locations to target. Next, set the mediation group status to Enabled, and then click Add Ad Units.

Associate this mediation group with one or more of your existing AdMob ad units. Then click Done.

You should now see the ad units card populated with the ad units you selected:

Add Meta Audience Network as an ad source
Under the Bidding card in the Ad Sources section, select Add ad source . Then select Meta Audience Network .Click How to sign a partnership agreement and set up a bidding partnership with Meta Audience Network.

Click Acknowledge & agree , then click Continue .

If you already have a mapping for Meta Audience Network, you can select it. Otherwise, click Add mapping .

Next, enter the Placement ID obtained in the previous section. Then click Done .
Add Meta to GDPR and US state regulations ad partners list
Follow the steps in European regulations settings and US state regulations settings to add Metato the European and US state regulations ad partners list in the AdMob UI.
Step 3: Import the Meta Audience Network SDK and adapter
Use Swift Package Manager
Before you continue, you must have the minimum supported adapter version 6.20.1.0.
To add a package dependency to your project, follow these steps:
-
In Xcode, navigate to File > Add Package Dependencies....
-
In the prompt that appears, search the following package URL:
https://github.com/googleads/googleads-mobile-ios-mediation-meta.git -
In Dependency Rule, select Branch.
-
In the text field, enter
main.
Use CocoaPods
-
Add the following line to your project's Podfile:
pod 'GoogleMobileAdsMediationFacebook' -
From the command line run:
pod install --repo-update
Manual integration
-
Download the latest version of the Meta Audience Network SDK for iOS and link
FBAudienceNetwork.frameworkin your project. -
Download the latest version of the Meta Audience Network adapter from the download link in the Changelog and link
MetaAdapter.frameworkin your project.
Step 4: Implement privacy settings on Meta Audience Network SDK
EU consent and GDPR
To comply with Google EU User Consent Policy , you must make certain disclosures to your users in the European Economic Area (EEA), the UK, and Switzerland, and obtain their consent for the use of cookies or other local storage where legally required, and for the collection, sharing, and use of personal data for ads personalization. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). You are responsible for verifying consent is propagated to each ad source in your mediation chain. Google is unable to pass the user's consent choice to such networks automatically.
Meta isn't registered on the IAB Europe Global Vendor List (GVL). Instead, you must use the Additional Consent technical specification. For more details, see Components of the Additional Consent . The Additional Consent specification works in conjunction with IAB Europe Transparency & Consent Framework (TCF) version 2. This specification lets you, along with their Consent Management Platforms (CMPs) and partners, collect and transmit supplementary consent signals for companies listed on the Google Ad Tech Providers (ATP) list, but are not yet part of the IAB Europe GVL.
Follow the guidance in Meta's documentation for GDPR and Meta advertising.
US states privacy laws
US states privacy laws require giving users the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered through a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The US states privacy laws compliance guide offers the ability to enable restricted data processing for Google ad serving, but Google is unable to apply this setting to each ad network in your mediation chain. Therefore, you must identify each ad network in your mediation chain that may participate in the sale of personal information and follow guidance from each of those networks to ensure compliance.
Follow the guidance in Meta's documentation for data processing options for users in California.
Step 5: Add required code
Compile errors
Swift
No additional code required for Swift integration.
Objective-C
For Meta Audience Network adapter 6.9.0.0 or higher, you must follow the steps below to add Swift paths to your target's Build Settings to prevent compile errors.
Add the following paths to the target's Build Settingsunder Library Search Paths:
$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)
$(SDKROOT)/usr/lib/swift
Add the following path to the target's Build Settingsunder Runpath Search Paths:
/usr/lib/swift
Advertising tracking enabled
If you are building for iOS 14 or later, Meta Audience Network requires that you explicitly set their Advertising Tracking Enabled flag using the following code:
Swift
// Set the flag as true.
FBAdSettings
.
setAdvertiserTrackingEnabled
(
true
)
Objective-C
// Set the flag as true.
[
FBAdSettings
setAdvertiserTrackingEnabled
:
YES
];
SKAdNetwork integration
Follow Meta Audience Network's documentation
to add the SKAdNetwork identifiers to your project's Info.plist
file.
Step 6: Test your implementation
Enable test ads
Make sure you register your test device for AdMob and enable test mode in Meta Audience Network UI.
Verify test ads
To verify that you are receiving test ads from Meta Audience Network, enable single ad source testing in ad inspector using the Meta Audience Network (Bidding)ad source(s).
Optional steps
Native ads
Some Meta Audience Network native ad
assets do not map one-to-one to Google native ad assets. Such assets are passed
back to the publisher in the extraAssets
property of GADNativeAd
. The
adapter supports passing the following assets:
GADFBSubtitle
GADFBSocialContext
Here's a code example showing how to extract these assets:
Swift
let
socialContext
=
nativeAd
.
extraAssets
?[
GADFBSocialContext
]
as
?
String
.
swift

