Google Mobile Ads Flutter mediation plugin for Meta Audience Network.
dependencies:
google_mobile_ads_facebook:
git:
url: https://github.com/kunny/google_mobile_ads_facebook.git
ref: <tag>
For example, if you want to depend on version 6.8.0
:
dependencies:
google_mobile_ads_facebook:
git:
url: https://github.com/kunny/google_mobile_ads_facebook.git
ref: 6.8.0
Refer to the available tags on here.
Get the tracking authorization status by
calling AppTrackingTransparency.trackingAuthorizationStatus
, which is available in
the app_tracking_transparency package.
final authStatus = await AppTrackingTransparency.trackingAuthorizationStatus;
Call GoogleMobileAdsFacebook.setAdvertiserTrackingEnabled()
to get personalized ads from Facebook.
await GoogleMobileAdsFacebook.setAdvertiserTrackingEnabled(authStatus == TrackingStatus.authorized);
Lastly, initialize the Google Mobile Ads SDK. Note that setAdvertiserTrackingEnabled()
should be
called before you initialize the Google Mobile Ads SDK.
await MobileAds.instance.initialize();
This is not an official Google product.