Snap Audience Network

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 this 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 those dependencies are present in your app.

  • For iOS apps (including those built from Unity), the Snap Audience Network SDK requires that its SKAdNetwork ID 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 in the MoPub UI

appId and slotId are required.

Initialization

Snap Audience Network requires initialization in order to serve ads. To initialize, follow these steps:

Initialize on 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);

Initialize on 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:^{
}];

Initialize on Unity

Option 1. Use the MoPub Manager

Attach the Snap Network Configuration script to your MoPub Manager Prefab, enable the script, and populate the appId information. Refer to the Network Configuration (Mediation) topic for an example.

Option 2. 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"},
      },
    }
  },
});

Test an Ad

We recommend that you test your Snap Audience Network integration using MoPub mediation test mode to verify that the adapter works as expected. Test mode must be set up on both the MoPub side and the Snap side.

Set Up Test Mode on the MoPub Side

Refer to our Mediation Test Mode article for complete details on using this mode.

Set Up Test Mode on the Snap Audience Network Side

Snap Audience Network supports test mode via test slot IDs provided for integration testing. Refer to these documents from Snap:

You can directly enter these Snap slot ad details into your MoPub network test mode setup (instructions here).

Note: Snap Audience Network requires that you pass the app ID upon initialization on Android. In your test environment, make sure that your initialization code contains the required information.

Additional Support

For inquiries and support, email Snap Audience Network at adkit-support@snapchat.com.


Last updated July 13, 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.)