When advertising with Facebook you want to pay for app installs and not for clicks. Learn how to set up Facebook Ads Delivery Optimization for App Installs.
Once you launch your app on the App Store you might want to advertise it through the Facebook Ads Platform. Once you start to set up your ad at https://developers.facebook.com/products/ads you will get to this section.
After you click on the dropdown and select “App Installs” you will see this message.
There are several steps to enable App Installs in your app, but we’ll cover all of them in this tutorial. It will be a long tutorial and by the end of it you will know how you can set up your app to have the option to set “App Installs” for the “Optimization for Ad Delivery” field. There are two types of Optimizations for Ad Delivery: Link Clicks and App Installs. The latter is recommended as it delivers the best value for your money. Optimizing your Facebook ad for App Installs basically means that you will only pay when your app is intalled. This is much better than paying for ad click which means that you will pay when a user click on your ad and it is taken to the App Store page of your app. Without further ado let’s dive in.
Create your Facebook App
Go to the Facebook Developer Portal: https://developers.facebook.com/ and create a new app.
I am going to use one of our live apps: Color the Owls, so I’ll name the app acordingly to “Color the Owls iOS”. Add your contact email and select your app category an sub-category.
After you click on “Create App ID” and complete the security question you’ll be ready wit the creation of the Facebook App.
Next you need to link your Advertising Account with your app to make measuring installs of your app possible. Go to https://www.facebook.com/ads/manager/account/settings to get your Advertising Account ID.
Copy your Advertising Account ID. You are going to paste it in the “Authorized Ad account Ids” field for your app.
First go to your app dashboard: https://developers.facebook.com/apps/
Select your app and navigate to “Settings > Advanced” and paste the Account ID into the “Authorized Ad Account IDs” field. Finally click on “Save Changes”.
Add the Facebook SDK to your app
Next go to: https://developers.facebook.com/quickstarts and select iOS.
Of course, select the app you have just created earlier. and click on the green button that says “Download SDK”.
Now it’s time to open your iOS app in Xcode and drag & drop the FBSDKCoreKit.framework into your project.
Make sure the framework is copied in correctly.
Build and Run you project. For some reason with Facebook iOS SDK v.4.14.0 you will get the following error requesting to add the Bolt.framework too.
I’m not quite sure why this is, it did not appear in the version before. And we are not going to use the Bolts.framework. Anyway, let’s fix this error by drag & dropping the Bolts.framework into your project the same way as you did with the FBSDKCoreKit.framework.
Build and Run again and your project should Succeed.
Next you need to configure your .plist. Select the Info.plist, right click on it and select “Open as > Source Code”.
Copy & Paste the XML snippet provided into the body of your file ( <dict>…</dict> ).
Next you need to supply your app Bundle Identifier.
Click on Next and a new section will appear. It’s time to add some code to your app.
First import FBSDKCoreKit into your AppDelegate.m file.
Next thing you want to do is activate your app and some more code if you use Mobile App Engagement Ads to get the deferred app link after your app is installed. This last part is crucial because it is not part of the default setup documentation on your Facebook Quick Setup page, but you need to add it here anyway.
Next continue with the provided code and add it to your applicationDidFinishWithOptions function.
Also do add the other function.
And we are done with the code.
Testing your integration
Next you need to test your app. Go to https://developers.facebook.com/tools/app-ads-helper/
Select your app and click on Submit. Scroll down and take a look at the iOS setup.
That doesn’t look right. Let’s fix it step by step.
First scroll down and click on the “Test App Events”.
Select “Me” for testing.
You will see the following screen.
Now Build and Run your app on a device. Once the app launches background and foreground the app several times if needed. Shortly your app will log events.
Great. Click on the little X on the top right corner and Refresh the page. Two Issues will be solved.
Hurray! Now let’s take care of the first one. Click on the “App Settings” link. Next open up a new browser tab and log into your iTunes Connect Account. Navigate to your App ID. Copy it.
Than go back to the Facebook Dashboard, scroll down and enter the ID. Since my app is Universal I can enter the same ID to both fields. Finally click on “Save Changes”.
Great. Now go back to the Ad Tester page and refresh.
Cool! 3 down, 1 to go.
To check the “Installs over the last 7 days” setup field you will need to get your new version of the app installed from the App Store. Basically you will need to submit the new version of your app, wait for the Review Team to accept it and make it live, than download it form the App Store and finally launch it.
All you need to do is bump up the version number (in our case from 1.0.0 to 1.0.1), archive and upload. Than create a new version of the app in iTunes Connect. Link the uploaded build and Submit for review. This is a basic submission of a new version of an app.
Once the new version is approved and live on the App Store download it and launch it. When you come back to the Ad Tester in the Facebook dashboard you will see the above.
Create a Facebook ad for App Installs as the ads delivery optimization
At the start of this tutorial we wanted to make our apps have the “App Installs” to be selectable when optimising ads delivery.
Let’s test it out. Go to https://developers.facebook.com/products/ads and click on the green “Create Ad” button.
Make sure that under Campaign Objective you select “Get installs for your app”.
Now you need to select your app. Go to “App” and select it and set the App Store to be “iTunes”.
Next go to “Budget & Schedule” and click on “Show Advanced Settings”.
Now for the last step check if you can select “App Installs” under “Optimization for Ad Delivery”.
If you still get that annoying alert than go through the tutorial steps once again and make sure you did everything right. If you missed to do anything in the Xcode project than you will need to resubmit your code again.
And that’s a wrap! Hope you enjoyed it and found this tutorial helpful. Leave you praises or questions in the comments below.