...
Important - Double check that the placement IDs that you set up match the ad format that you’re creating. The ad type can be found at the top of the page on the “Edit Ad Unit” page. Ensure that you use an interstitial placement ID for an interstitial unit, and a banner for banner/mrec.
Step 3. Update AppLovin Unity SDK
Ensure that your project is updated to the latest AppLovin SDK, at least version 11.2.0:
From the top menu, select AppLovin → Integration Manager
Click on the “Upgrade” button if available and import the updated packages.
Step 4. Import the MobileFuse adapter UnityPackage
Download the MobileFuse
...
Gradle Setup
1- Ensure that mavenCentral
is included in your settings.gradle file:
Code Block |
---|
repositories {
// [... other project repos]
mavenCentral()
} |
2- Update your app module’s dependencies to include the MobileFuse AppLovin Adapter:
Code Block |
---|
dependencies {
// [... other project dependencies]
implementation 'com.mobilefuse.sdk:mobilefuse-adapter-applovin:1.0.0.0'
} |
Step 4. Configure Data Privacy
The only other configuration that you may want to set up is data privacy. You should call the MobileFuse.setPrivacyPreferences()
method as soon as possible after your app launches, or when the users privacy preferences change. This will allow you to supply an IAB consent string or US privacy string that will be passed through to MobileFuse:
Insert excerpt
View file | ||
---|---|---|
|
Import the files from this unity package into your project.
Note: If you haven’t enabled multidex, there’s a chance that due to androidx the MobileFuse SDK may take your app over the method limit. Ensure that multidex is enabled for your project if you are getting build failures.
Step 5. Configure data privacy
To ensure highest fill and CPMs, it’s advisable to configure the data privacy preferences of your user, preferably before initializing the MAX sdk.
The MobileFuse SDK supports privacy configurations that can be managed using an IAB compatible US Privacy String, and IAB Consent Framework strings for GDPR. You can also notify the SDK whether your user subject to COPPA, due to them being under 13 years of age.
The following snippet demonstrates configuration for the US privacy and COPPA compliance:
Code Block | ||
---|---|---|
| ||
using MobileFuseAds;
using MobileFuseAds.Privacy;
void SetupAppLovinMax() {
var mfPrivacyPrefs = new MobileFusePrivacyPreferences.Builder()
.SetSubjectToCoppa(false) // should be true if user is under 13 years of age
.SetUsPrivacyConsentString("<US Privacy String>") // e.g. 1YNN
.Build();
MobileFuse.SetPrivacyPreferences(mfPrivacyPrefs);
// ...
MaxSdk.InitializeSdk();
} |
GDPR for European users
For your European users, you must supply an IAB-compatible privacy consent string. The following example shows how to declare consent for a user which is subject to GDPR due to being located in an EAA country. Note that this can simply be chained to the same MobileFusePrivacyPreferences.Builder() as above.
Code Block | ||
---|---|---|
| ||
var mfPrivacyPrefs = new MobileFusePrivacyPreferences.Builder()
.SetIabConsentString("<IAB Consent String>")
.Build();
MobileFuse.SetPrivacyPreferences(mfPrivacyPrefs); |