Do you know that you can use Facebook ads for your mobile commerce apps?

Many are unaware of what’s possible but let me give you a few ideas:

  • You can easily target people who have visited your website and get them to install your mobile commerce app.
  • You can easily target people who have installed your app but haven’t used it in a while.
  • You can easily target people who added an item in the shopping cart but haven’t finished the order
  • You can easily target people who have purchased from you before and upsell or cross-sell them.

The options are limitless and in this blog post we’re going to cover in details how to use Facebook ads for your mobile commerce apps so you drive positive ROI for your business.

Keep in mind that some technical knowledge might be required in order to make things work smoothly and make the necessary integrations.

SDK setup

To get the most out of your Facebook Ads for your mobile commerce apps you will need to add Facebook SDK to them.

This will give additional functionality and options.

With Facebook SDK you will be able to:

  • Measure installs so you know how many people installed your app after seeing and clicking on your Facebook ads
  • Measure app events so you know what people did after clicking on your Facebook ad
  • Add deep linking to your ads so you can advertise not only your app but specific content from your app such as products, special offers, etc.
  • Bring people back to your app who haven’t use it in a while
  • Improve targeting by getting more data and understanding your audience better
  • Encourage purchases for specific products
  • Create re-engagement ads for people that interact less with your app
  • Measure in-app conversions so you know how Facebook ads convert into sales.

To integrate Facebook SDK with your Mobile Commerce app you need to do the following:

Get your Facebook App ID – you need a Facebook App ID for your iOS or Android app. Use Quick Starts to create and add your new app.

Select either iOS or Android depending on your operation system.

When you click on it type the name of your new app. For example: HappyPets.com. Then click on Create new Facebook app ID.

Then in the popup window type your contact email, choose your app category and click on create app ID.

After you do this you will be able to download the Facebook SDK and unzip the archive into ~/Documents/FacebookSDK.

To add the Facebook SDK to your Xcode project go to your Facebook SDK folder.

Then drag the folder Bolts.framework, FBSDKCoreKit.Framework, FBSDKLoginKit.Framework, FBSDKShareKit.Framework into your Xcode Projects Framework folder.

The next step is to find the .plist file in the Supporting Files folder in your Xcode Project and configure it.

Right click on the .plist file and choose “Open as a source code”. Then copy & paste this XML file in the body of your file.

<key>CFBundleURLTypes</key>

<array>

 <dict>

 <key>CFBundleURLSchemes</key>

 <array>

   <string>fb1634326570195151</string>

 </array>

 </dict>

</array>

<key>FacebookAppID</key>

<string>1634326570195151</string>

<key>FacebookDisplayName</key>

<string>HappyPets.com</string>

Don’t forget to supply Facebook with your bundle identifier.

Link Ad Accounts – to be able to measure installs of your app in your Facebook ad manager you have to associate your advertising account with your app.

To do that go your app dashboard, choose your app and then go to Settings -> Advanced.

Scroll down and in the field advertising accounts add your Authorized Ad Account IDs.

Add Facebook SDK to your App –
the next step is to add the Facebook SDK to your mobile commerce app.

This will differ depending on if you’re having an iOS and Android app.

For iOS things are bit easier and you have 2 options – to use the Quick Start tool. The alternative is to use the manual configuration.

To do that open your Facebook app dashboard and select your app.

Click on Settings -> Add Platform and select iOS.

Locate your bundle identifier in Xcode and copy it to your clipboard.

Go to your app dashboard and paste your bundle identifier into the Bundle ID field.

Then enable Single sign on and save the changes.

Download the Facebook SDK for iOS and unzip the archive to ~/Documents/FacebookSDK.

Then add the SDK in your Xcode project.

To do that go to your application’s Xcode project. Create a Frameworks group if you don’t have one.

Then open ~/Documents/FacebookSDK using Finder.

Drag the Bolts.framework, FBSDKCoreKit.framework, FBSDKLoginKit.framework, and FBSDKShareKit.framework files into the Frameworks group of Xcode’s Project Navigator. In the displayed dialog, choose Create groups for any added folders and deselect Copy items into destination group’s folder. This references the SDK where you installed it rather than copying the SDK into your app.

After this open Xcode’s Build Settings tab in your project and add ~/Documents/FacebookSDK to the project’s Framework Search Paths setting.

In Xcode, open the source code of your project’s .plist file.

Then Insert the following XML snippet into the body of your file just before the final element.

<key>CFBundleURLTypes</key>

<array>

 <dict>

   <key>CFBundleURLSchemes</key>

   <array>

     <string>fb{your-app-id}</string>

   </array>

 </dict>

</array>

<key>FacebookAppID</key>

<string>{your-app-id}</string>

<key>FacebookDisplayName</key>

<string>{your-app-name}</string>

<key>LSApplicationQueriesSchemes</key>

<array>

 <string>fbapi</string>

 <string>fb-messenger-api</string>

 <string>fbauth2</string>

 <string>fbshareextension</string>

</array>

<key>NSPhotoLibraryUsageDescription</key>

 <string>{human-readable reason for photo access}</string>

Replace fb{your-app-id} with your Facebook app ID, prefixed with fb. For example, fb123456. You can find your app ID on the Facebook App Dashboard.

Replace {your-app-id} with your app ID.

Replace {your-app-name} with the display name you specified in the App Dashboard.

Replace {human-readable reason for photo access} with the reason your app needs photo access.

To post-process the results from actions that require you to switch to the native Facebook app or Safari, such as Facebook Login or Facebook Dialogs, you need to connect your AppDelegate class to the FBSDKApplicationDelegate object.

To do this, add the following code to your AppDelegate.m file:

//  AppDelegate.m

#import <FBSDKCoreKit/FBSDKCoreKit.h>

 

– (BOOL)application:(UIApplication *)application

   didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

 

 [[FBSDKApplicationDelegate sharedInstance] application:application

   didFinishLaunchingWithOptions:launchOptions];

 // Add any custom logic here.

 return YES;

 

– (BOOL)application:(UIApplication *)application

           openURL:(NSURL *)url

           options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

 

 BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application

   openURL:url

   sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]

   annotation:options[UIApplicationOpenURLOptionsAnnotationKey]

 ];

 // Add any custom logic here.

 return handled;

}

Enable Install tracking – to do this, be sure to enable install tracking call the App Events logger once your application becomes active.

For iOS you do this with the following code:

– (void)applicationDidBecomeActive:(UIApplication *)application {

  [FBSDKAppEvents activateApp];

}

For Android you do this with the following code:

@Override

protected void onResume() {

 super.onResume();

 AppEventsLogger.activateApp(this);

 // …

}

 

// Optional: App Deactivation Event

@Override

protected void onPause() {

 super.onPause();

 AppEventsLogger.deactivateApp(this);

}

Enable Install tracking – to do this, be sure to enable install tracking call the App Events logger once your application becomes active.
For iOS you do this with the following code:

More tracking options (App events) – to better understand how people are using your app after they click on the Facebook ads you will need to add app events.
You do this by logging events via one of 14 predefined events or creating a custom event of your own:

  • App launched
  • Added payment info
  • Added to Cart
  • Added to Wishlist
  • Completed registration
  • Initiated checkout
  • Purchased
  • Rated
  • Searched
  • Viewed content
  • Completed tutorial

You need to add Logging app activations to your App observe how frequently users activate your app, how much time they spend using it, and view other demographic information through Facebook Analytics for Apps.

To activate it, add this code in your app delegate’s applicationDidBecomeActive method:

– (void)applicationDidBecomeActive:(UIApplication *)application {    

   // Call the ‘activateApp’ method to log an app event for use

   // in analytics and advertising reporting.

   [FBSDKAppEvents activateApp];

   // …

}

The Facebook SDK also provides a helper method to log purchases with a simple sine of code.

For example:

[FBSDKAppEvents logPurchase:4.32 currency:@“USD”];

In case you can’t use the manual logging method, you can use automatically log app events related to in-app purchases.

To enable it, call the activateApp method during app activation and enable the “Automatic In-App Purchase” switch in the iOS settings section of the app’s dashboard.

For all other events, you can use the logEvent method:

[FBSDKAppEvents logEvent:FBSDKAppEventName{XXXX}];

where FBSDKAppEventName{XXXX} is one of the FBSDKAppEventName* constants shown in the Events table.

Each of these events can be logged with a valueToSum and a set of parameters (up to 25 parameters).

Verify Setup – to be sure all app events and the Facebook SDK are working properly you can verify that using the App Ads Helper.

Promoting your app and getting new installs

The most basic way to use Facebook ads to help your eCommerce business is to get more mobile app installs.

That way your apps will be promoted in the Facebook mobile news feed.

So when someone clicks on them they will be taken Google Play or Apple’s App Store depending on the platform they are using.

Elements of your mobile app Facebook ad – each ad is compound of your app’s name and your ad creative (image or video and copy).

As a visual you can either have an image or a video.

The recommended image size is 1,200 x 628 pixels which ensures that it always looks good and in high-quality.

Remember that your image shouldn’t include more than 20% text. Otherwise, your ad won’t be approved.

When you’re using an image your copy should be no longer than 90 characters.

If you’re using video, then you should have a minimum resolution of 600 x 315 pixels (1.9:1 landscape) / 600 x 600 pixels (square) / 600 x 900 pixels (vertical).

The square format is preferred for mobile ads.

The file size shouldn’t be more than 4GB and you should use up to 30fps.

Your thumbnail image ratio should match the aspect ratio of your video. Just like in images, it shouldn’t include more than 20% text.

When you use the video format of an ad you can have a text of 90 characters, headline of 25 characters, news feed description of 30 characters and caption length text of 2,200 characters.

Additionally, to both type of ads you can add a customizable call-to-action button in the bottom right of your ad (such as Install Now, Download or Use App).

Create the ad to promote your app – click on Create Ad and choose get installs of your app to set the objectives to “App installs”.

Your next step is to choose your App or enter URL. You should have already added it in your Facebook account.

Unfortunately, you can promote only 1 platform at a time – so you will need to create one ad to target iOS users and 1 to target Android users.

Your next step is to define your audience you’d like to reach.

Your best bet with targeting is first to target your mobile commerce app to people who have already interacted with your business because they have the highest chance of converting.

They already know who you are and what you offer.

You can target people who are already fans of your Facebook page.

To do that go to Connections -> Facebook pages -> People who like your Page.

Another option is to create a custom audience of people who have interacted with your business (email subscribers, customers, people who have visited your website, etc.)

Go to Custom audience -> Create new -> Custom audience.

After that you can create your custom audience based on 4 options:

For the purpose of increasing install of your mobile commerce app you can either use customer file or website traffic.

With customer file you can either upload your own file with customer information (names, email addresses, phone numbers, etc.) or upload directly from MailChimp.

That way you can target people who registered on your website but don’t use your mobile commerce app yet.

If you choose website traffic, you can target everybody who have visited your site within a certain amount of time (For example: 30 days).

Don’t forget that you need to have a Facebook pixel installed on your site for this to work.

Be sure to create each ad targeting only user of the specific platforms. You don’t want to advertise your iOS app to Android users and vice versa.

To target only iOS or Android users go to Detailed targeting -> Browse -> Behaviors -> Mobile device users -> All mobile devices by Operating system.

Then check on either All Android devices or all iOS devices depending on who you are targeting with this ad.

We recommend you use automatic placements for your ad. That way Facebook will automatically optimize where to put your ad.

You might mess up with one if you don’t understand it too well.

Be sure to choose your daily budget wisely. You want to start small and test how different ads are performing.

Then after you have a well-performing ad you can increase the budget slightly to scale up your campaign.

For optimization for ad delivery you might decide to choose app installs over link clicks.

That way Facebook will optimize your ad to get the most app installs. Still you can choose link clicks and compare how both differ in terms of performs, clicks and cost.

Exclude people who installed your app – it’s important to do this since you don’t want to waste your ad budget on targeting people who already have installed your app.

For Android users you don’t have to do anything since they are automatically excluded from your campaign. For that you need to provide your app’s package name in the app settings page.

For iOS 9.0+ you can only exclude people if you forward your app events to Facebook. That way you can exclude users for up to 180 days after their most recent activity (app install, app open or in-app event).

Keep in mind that in case you’re using a Mobile Measurement Partner who only sends you app install events, after 180 days, these people who installed your app will began to see app install ads even if they’re using the app.

For iOS 8.x and below, you can exclude users when you detect the app is already installed on the device.

To be able to detect this, you must do one of the following:

  • Configure your application’s Info.plist file so that fb{your-fb-app-id} is a registered URL scheme for your app. That way when Facebook detects fb{your-fb-app-id} is a registered URL scheme on the device, it will know that device already has your app installed and it will exclude the user.
  • Give Facebook a deep link when creating the ad. That way if Facebook detects that you deep link URL’s scheme is a registered scheme on the device, it will know that the app is already installed on the device and it will exclude the user.Your next step is to choose your App or enter URL. You should have already added it in your Facebook account.Unfortunately, you can promote only 1 platform at a time – so you will need to create one ad to target iOS users and 1 to target Android users.Your next step is to define your audience you’d like to reach.Your best bet with targeting is first to target your mobile commerce app to people who have already interacted with your business because they have the highest chance of converting.They already know who you are and what you offer.You can target people who are already fans of your Facebook page.

    To do that go to Connections -> Facebook pages -> People who like your Page.

    Another option is to create a custom audience of people who have interacted with your business (email subscribers, customers, people who have visited your website, etc.)

    Go to Custom audience -> Create new -> Custom audience.

    After that you can create your custom audience based on 4 options:

    For the purpose of increasing install of your mobile commerce app you can either use customer file or website traffic.

    With customer file you can either upload your own file with customer information (names, email addresses, phone numbers, etc.) or upload directly from MailChimp.

    That way you can target people who registered on your website but don’t use your mobile commerce app yet.

    If you choose website traffic, you can target everybody who have visited your site within a certain amount of time (For example: 30 days).

    Don’t forget that you need to have a Facebook pixel installed on your site for this to work.

    Be sure to create each ad targeting only user of the specific platforms. You don’t want to advertise your iOS app to Android users and vice versa.

    To target only iOS or Android users go to Detailed targeting -> Browse -> Behaviors -> Mobile device users -> All mobile devices by Operating system.

    Then check on either All Android devices or all iOS devices depending on who you are targeting with this ad.

    We recommend you use automatic placements for your ad. That way Facebook will automatically optimize where to put your ad.

    You might mess up with one if you don’t understand it too well.

    Be sure to choose your daily budget wisely. You want to start small and test how different ads are performing.

    Then after you have a well-performing ad you can increase the budget slightly to scale up your campaign.

    For optimization for ad delivery you might decide to choose app installs over link clicks.

    That way Facebook will optimize your ad to get the most app installs. Still you can choose link clicks and compare how both differ in terms of performs, clicks and cost.

    Exclude people who installed your app – it’s important to do this since you don’t want to waste your ad budget on targeting people who already have installed your app.

    For Android users you don’t have to do anything since they are automatically excluded from your campaign. For that you need to provide your app’s package name in the app settings page.

    For iOS 9.0+ you can only exclude people if you forward your app events to Facebook. That way you can exclude users for up to 180 days after their most recent activity (app install, app open or in-app event).

    Keep in mind that in case you’re using a Mobile Measurement Partner who only sends you app install events, after 180 days, these people who installed your app will began to see app install ads even if they’re using the app.

    For iOS 8.x and below, you can exclude users when you detect the app is already installed on the device.

    To be able to detect this, you must do one of the following:

    • Configure your application’s Info.plist file so that fb{your-fb-app-id} is a registered URL scheme for your app. That way when Facebook detects fb{your-fb-app-id} is a registered URL scheme on the device, it will know that device already has your app installed and it will exclude the user.
    • Give Facebook a deep link when creating the ad. That way if Facebook detects that you deep link URL’s scheme is a registered scheme on the device, it will know that the app is already installed on the device and it will exclude the user.

Promote products with deep linking:

By using deep links you can send people directly to a specific content of your app – such as a product, category page or a promo offer.

That way after users click on your Facebook ad your mobile commerce app will open on the desired page instead of just going on the homepage.

Even if people don’t have your app installed yet and they have to do it. After they do it, the desired content will be loaded and opened for them.

So here’s how to make deep linking possible:

iOS and Android Setup – for iOS you can easily handle deep links using the Bolts Framework. In case, you prefer other method then use one of the following methods:

To enable deep linking for Android check out the official tutorial on android.com.

Add deep linking information – to do be able to do this you should have already setup your Facebook SDK. Then you need to add deep linking information in your Facebook app settings.

For iOS setup the following settings:

For Android setup the following settings:

  • ClassName – find the ClassName of the launch activity in the file AndroidManifest.xml. The class name should take the form com.example.androidapp.MainActivity.

Deferred deep linking information – if you want to send people to a custom view after they install your app, you will need to use deferred deep linking.

You need to use this when you target people who didn’t install your app. For the people who already did that, you don’t need to use deferred deep linking.

The Facebook SDK for iOS and Android includes the product App Links, which will enable you to support deferred deep linking in your app.

Additionally, just add the following code to your app to handle deferred deep links.

iOS SDK:

// Add Bolts.framework to your project (part of the FB SDK)

#import <Bolts/Bolts.h>

#import <FBSDKCoreKit/FBSDKCoreKit.h>

 

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

 if (launchOptions[UIApplicationLaunchOptionsURLKey] == nil) {

   [FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {

     if (error) {

       NSLog(@“Received error while fetching deferred app link %@”, error);

     }

     if (url) {

       [[UIApplication sharedApplication] openURL:url];

     }

   }];

 }

 return YES;

}

Android SDK:

AppLinkData.fetchDeferredAppLinkData(this,

 new AppLinkData.CompletionHandler() {

    @Override

    public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {

        // Process app link data

    }

}

);

Verify Deep link setup – be sure to verify the Facebook SDK and deep link setup using App Ads helper.

It is highly recommended that you do this before you run any deep links ads to be sure everything is working correctly.

Add Deep link to your Ad – pay attention to the following settings – who do you want your platform to reach.

  • iOS: iOS only for the setting platform.
  • Android: Android only for the setting platform.

To add your deep link go to What text and links do you want to use? and insert it in Deep link (optional).

How to target your Ads

The way you target your Facebook ads will determine your success. Here are the targeting options you can use:

Targeting essentials – the generic targeting options that you can use are as follows:

  • Location – you can target people from specific countries or cities
  • Demographics – you can target people based on age, gender, education, relationship status, etc.
  • Interests – you can target people based on their interests and activities on Facebook.
  • Behaviors – you can target people based on their purchase behavior, device they use and other activities
  • Connections – you can target people who like your Facebook page or your app

Specific targeting options for mobile apps – some targeting options that are available only for mobile apps are as follows:

  • Platform – iOS or Android
  • OS versions – specific versions of iOS or Android. You can set up a min and max version.
  • Devices – you can target the specific device models that you’re interested such as iPhone 5, Samsung Galaxy S5, etc.
  • WiFi only – you can target only devices connected to WiFi. This is valuable if you want to target people to install your app.
  • Connections –  

App connection targeting (app install ads, app engagement ads) – with it you can target people by their connection with your app or page.

Keep in mind that in order to use it you must integrate Facebook SDK for your iOS or Android app.

By using it you can have 2 major objections – get install of your app and increase engagement in your app.

With Get install of your app you have the options to:

  • Target people who already used your app
  • Target friend of people who already used your app
  • Exclude people who already used your app

With Increase engagement in your app you have the following options to:

  • Target all people
  • Target people who are connected with your app
  • Target people only not connected with your app
  • Use advanced connection targeting (with it you can further include and exclude people depending on if they are connected with one of your pages, apps or events)

Bring people back to your app – Now let’s show you can you can use Facebook ads to get more engagement with your mobile commerce app.

You might want to target people who downloaded and installed your app but haven’t used it in the last 90 days.

That way you can bring people back and engage them with your content and products so they can convert into paying customers.

Keep in mind that in order to execute this successfully you need to integrate Facebook SDK with your app and deep linking.

Once you have done this you can create your ad.

To target people who haven’t used your app in the last 90 days do the following:

Create an ad, go to Who do you want your ads to reach? (Step 2) and click on Create Custom Audience.

Choose action not taken, in include “All users’ and in the last 90 days.

Then you can complete your ad and it will be delivered only to the users you haven’t used your app in the last 90 days.

Based on app activity – in other words, using this option you can target people who have taken specific actions within your app.

For example: you can target people who have added a product to your cart but didn’t complete the purchase or viewed specific products.

By using this option you can make your ads much more relevant to your audience and at the same time they can help you better achieve your current objectives.

You can reach people who recently opened your app the following way.

Create a custom audience that tracks the app launch using App events by calling the activateApp method:

For iOS:

– (void)applicationDidBecomeActive:(UIApplication *)application {

  [FBSDKAppEvents activateApp];

}

For Android:

@Override

protected void onResume() {

 super.onResume();

 AppEventsLogger.activateApp(this);

}

Then create a new ad and go to “Create new custom audience” and pick the following options from the form:

  • Type audience -> App activity
  • Action taken -> App launches
  • In the last -> 60 days

Another activity you can target is a completed recent purchase.

That way you can easily use Facebook ads to upsell or cross-sell to your mobile commerce customers.

To do this you need to first create a custom audience based on purchase behavior using App events. You track purchases by using the logPurchase method.

For iOS use this code:

[FBSDKAppEvents logPurchase:4.32 currency:@“USD”];

For Android use this code:

logger.logPurchase(BigDecimal.valueOf(4.32), Currency.getInstance(“USD”));

Then create a new ad and go to “Create new custom audience” and pick the following options from the form:

  • Type audience -> App activity
  • Action taken -> purchases
  • In the last -> 30 days

You can modify this slightly to target people who have abandon your cart in your mobile commerce app and bring them back to finish their orders.

To do that simply use the following options:

  • Type of audience -> App activity
  • List of people based on … -> Combined action
  • Action taken -> Add to Cart
  • In the last -> 30 days
  • Action not taken -> purchases
  • In the last -> 30 days

By customer list – you can create a custom audience of people you’re already connected in some way using information you have available about them.

You can easily upload your email list of subscribers and create a custom audience of them. You can do that by uploading an excel file or integrating directly with MailChimp.

Beside email addresses, you can create a custom audience out of phone numbers, Facebook user IDs or mobile advertising IDs.

To target people by customer list simply click on create new custom audience and pick the Customer file option:

Then you can upload your audience using a .csv or .txt format.

Keep in mind that after you import your list it will take up to 30 minutes to be ready. So take your time.

By lookalike audience – that way you will be able to target people who look like your established customers.

The idea is that Facebook uses a small custom audience that you upload as a seed and then it builds an audience to target around that.

To use it you need to have at least one source of which Facebook will create a lookalike audience:

  • Mobile apps by using App events
  • Facebook page
  • Custom audience
  • Facebook pixel

To create an ad based on lookalike audience go to Audience -> Create new -> Create new -> Lookalike audience:

Then choose your source (a custom audience, conversion pixel or a page), country to target and audience size.

Keep in mind that the configuration of the lookalike audience might take up to 2 hours to be ready to be used.

Final words

Using Facebook ads for your mobile commerce apps might be more difficult than when it comes to websites but it pays off once you learn how to do it.

The options are incredible – you can target your website users to download your app, you can re-engage people who haven’t used your app in a while or have bought from you before.

You can even target people who have added an item to their shopping cart and haven’t finished their order.

The options are limitless and if you’re creative enough you can drive great results for your business.

Do you currently use Facebook ads for your mobile commerce apps? How do you use them or how are you planning on using them? Let us know in the comments below.

The Ultimate Guide to Facebook Ads for Mobile Commerce Apps

Leave a Reply

Your email address will not be published. Required fields are marked *