Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.4 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.4 KB

Meta Audience Network mediation plugin for Google Mobile Ads Flutter

Google Mobile Ads Flutter mediation plugin for Meta Audience Network.

Use this package as a library

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.

Usage

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();

Disclaimer

This is not an official Google product.