Snap Audience Network
- Supported Ad Formats
- Download and Integration
- Set up Snap Audience Network on the MoPub UI
- Initialization
- Additional Support
If you plan to use the MoPub SDK to load and display ads from Snap Audience Network via mediation, use this article for integration instructions and information unique to the ad network. To learn more about how MoPub mediation works, refer to our MoPub Network Mediation article.
Supported Ad Formats
Snap Audience Network currently supports the following ad formats. For support information, visit the Snap Ad Kit homepage.
MoPub Formats | Snap Audience Network Ad Formats |
---|---|
Banner | Banner |
Medium Rectangle | Medium Rectangle |
Interstitial | Interstitial |
Rewarded Ad | Rewarded Video |
Download and Integration
To download the Snap Audience Network adapters, navigate to the Mediation Integration Tool.
-
For Android apps (including those built from Unity), the Snap Audience Network SDK requires the
com.google.android.gms:play-services-ads-identifier
,androidx.constraintlayout:constraintlayout
, and Picasso dependencies. Ensure that you have those dependencies present in your app. -
For iOS apps (including those built from Unity), the Snap Audience Network SDK requires its SKAdNetwork ID to be entered in your app’s info.plist. Otherwise, the SDK will crash on app launch. Check your Xcode console for instructions to add that ID.
Set up Snap Audience Network on the MoPub UI
appId
andslotId
are required.
Initialization
Snap Audience Network requires initialization in order to serve ads. To initialize, follow the steps below:
Android
import com.mopub.mobileads.SnapAdAdapterConfiguration;
// Declare your Snap Audience Network app ID and config bundle
final Map<String, String> snapConfigs = new HashMap<>();
snapConfigs.put("appId", "YOUR_SNAP_APP_ID");
final SdkConfiguration.Builder configBuilder = new SdkConfiguration.Builder("A_VALID_AD_UNIT_ID_FROM_YOUR_APP");
configBuilder.withAdditionalNetwork(SnapAdAdapterConfiguration.class.getName()); // only needed for MoPub 5.14.0 and earlier
configBuilder.withMediatedNetworkConfiguration(SnapAdAdapterConfiguration.class.getName(), snapConfigs);
// Initialize the MoPub SDK
MoPub.initializeSdk(this, configBuilder.build(), null);
iOS
// Declare your Snap Audience Network app ID and config bundle
NSMutableDictionary *snapConfigs = [NSMutableDictionary new];
[snapConfigs setObject:@"YOUR_SNAP_APP_ID" forKey:@"appId"];
MPMoPubConfiguration *sdkConfig = [[MPMoPubConfiguration alloc] initWithAdUnitIdForAppInitialization:@"AD_UNIT_ID"];
sdkConfig.additionalNetworks = @[SnapAdAdapterConfiguration.class]; // only needed for MoPub 5.7.0 and earlier
sdkConfig.mediatedNetworkConfigurations = [@{@"SnapAdAdapterConfiguration":snapConfigs} mutableCopy];
// Initialize the MoPub SDK
[[MoPub sharedInstance] initializeSdkWithConfiguration:sdkConfig completion:^{
}];
Unity
Use the MoPub Manager:
Ensure you attach the Snap Network Configuration script to your MoPub Manager Prefab, enable the script, and populate the appId
information. Please see the “Network Configuration (Mediation)” topic here for an example.
Initialize manually:
MoPub.InitializeSdk(new MoPub.SdkConfiguration {
// Define the Snap Audience Network app ID you want to initialize with
MediatedNetworks = new MoPub.MediatedNetwork[]
{
new MoPub.MediatedNetwork
{
// Specify the class name that implements the AdapterConfiguration interface.
#if UNITY_ANDROID
AdapterConfigurationClassName = "com.mopub.mobileads.SnapAdAdapterConfiguration",
#else // UNITY_IOS
AdapterConfigurationClassName = "SnapAdAdapterConfiguration",
#endif
NetworkConfiguration = new Dictionary<string, string> {
{ "appId", "YOUR_SNAP_APP_ID"},
},
}
},
});
Additional Support
For inquiries and support, please email Snap Audience Network at adkit-support@snapchat.com.
Last updated February 16, 2021
TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.
© 2021 MoPub (a division of Twitter, Inc.)