Contacts

How to advertise in android application. Mobile app monetization through advertising. What type of advertising to choose

AdMob advertising

The first advertising platform we tried was AdMob. AdMob has every possible ad type. The site performed well. An average eCPM of $0.5 and a high Fill Rate suited us completely. But at some point we got two ads blocked. After that, we found reviews on the Internet that AdMob can block the entire account with the freezing of funds. Since we have a large number of applications, we were at risk - we had to go in search of a new ideal advertising platform.

At the moment, the last requests from the iOS application are flying away. The statistics for it are shown in the screenshot below. Average eCPM — $0.5

Advertising platform StartApp

With StartApp, we have been monetizing applications for just a couple of months. Due to an ad from this site, we were blocked from the application (because the ad contained an ad for an application that was outside of Google Play, which is prohibited by Google Play policy). We did not see an impressive income, therefore, without the slightest doubt, we decided to abandon this site. This incident happened about 3 years ago. The blocking situation happened 3 years ago. Perhaps, by this moment (2018 in the yard), the site has already been corrected. But the fact remains...

Advertising

This service specializes in native advertising. We worked with him for about two years. The scores were very high. But, unfortunately, recently the site has reduced its turnover and it has become unprofitable to work with it. Let's hope that PubNative will still come to life.

We have residual traffic to this site from older versions of several applications. The screenshot shows the current values. Average eCPM — $0.06

AdToApp advertising platform aggregator

We worked with these guys for more than a year, so we were able to study the service well. The description of the aggregator sounded convincing: many sites, all possible types of ads. In addition, their smart system supposedly determines the best platforms for the application and sends traffic only to them. As a result, earnings should be maximum, and the service takes only a small percentage.

In fact, we had to independently check which sites were generating the most income and ask the manager to switch the levers. But we must give them their due: after all, thanks to this service, we were able to learn about new cool advertising platforms. When we connected our own ensemble of these sites, the income increased almost 10 times. Let's talk about them in more detail later.

Google recently removed 2 apps due to security policy violations. AdToApp sent a request to its server containing the user's phone number. After that, we finally got rid of this service, but older versions of apps still play ads. Here are the current figures. Average eCPM — $0.49

How to squeeze the maximum income from the application

Next, I will describe the scheme by which we monetize all our applications. For the best result, it is necessary to integrate all the platforms that will be described below. We mainly use interstitial and native advertising, and only in rare cases - video advertising.

The general scheme of work is as follows:

  1. Uploading the Avocarrot advertisement. If there is an advertisement, then we show it. If “no fill” comes, then go to step 2.
  2. Loading ads from Yandex. If there is an advertisement, then we show it. If “no fill” comes, then go to step 3.
  3. Loading ads from Mail (MyTarget). If there is an advertisement, then we show it. If “no fill” comes, then go to step 4.
  4. You can stop here, but if you're not afraid of being cursed by your users, you can also add ads from Vungle.

You can also set up Floors for grids that allow you to do this in order to more intelligently redistribute traffic and get the maximum increase in earnings.

Advertising from Glispa (old name Avocarrot)

The site provides all types of ads. Their interstitials look neat and don't irritate users much. It is possible to set Floor for eCPM (minimum pay per thousand impressions). AT better times for traffic from the USA they gave more than $ 1 eCPM for native advertising. It can also be used for Russian traffic, but the occupancy rate will be low. This service is used in many applications. Average eCPM - $0.15

Mobile advertising from Yandex

Yandex provides native and interstitial advertising. It is built in quite simply and looks tolerable. In order to become their partner, you need to carry out a number of bureaucratic procedures: provide all your documents, sign an agreement and send it by mail. If you do not have an individual entrepreneur, then Yandex will pay 13% income tax and VAT for you, but despite all the taxes, the income from the site remains decent. The average ECPM for native and interstitial ads is $11.17, as you can see from the screenshot below.

Mobile Advertising from MyTarget (Mail.ru)

These guys are very similar in their approach to Yandex, which is not surprising. For registration of partnership - the same bureaucracy. Recently, eCPM has grown a lot and for one of the applications it is as much as 63 rubles, which is a very high figure for Russian traffic. Current stats below.

Advertising from Vungle

This service bans video ads. There is also rewarded advertising - this type of advertising allows you to give bonuses for viewing ads. This service is an absolute record holder in the eCPM category, it reached $10 per thousand impressions on US users. Ads are very annoying, and if you are not afraid of the wrath of your users, then feel free to use this service. Below are the current figures. Average eCPM - $0.90

Afterword

At the moment, MyTarget has the best performance, but in my approach, grids are the first to set thresholds and with their help you can increase traffic to MyTarget. And ideally, make it possible to change priorities remotely. So that the most profitable grids are in priority.

There have been some changes since the release of adding AdMob ads, and today I will talk about them in more detail.
We will work not with a new project, but with an existing one, using Eclipse. Google compiled good instruction about how to add ads while working in Android Studio, and I'll talk about an alternative.
I will take the project from previous articles about ContentProvider, source files markup and Activity code can be viewed.
So, first we need to download (or check) the latest version of the Google Play Services package:
1. Open Android SDK Manager (Window -> Android SDK Manager)
2. Scroll down the packages window to the Extras section and see if there are updates or the latest version is installed.

Now we need to import the library from Google Play Services in order to connect it to our project later:

1. File -> Import… -> Existing Android Code into Workspace
2. The library is in the Android SDK folder: \sdk\extras\google\google_play_services\libproject\google-play-services_lib
3. Select this folder and click Finish.

It remains only to connect this library to the project:

1. Open the properties of our project: select the folder with the project in Eclipse, File -> Properties
2. In the properties window, open the Android section, and from the bottom in the Library tab, click Add ...
3. In the window that appears, select google-play-services_lib - done, the library is connected.

Now you need to set the necessary settings in the AndroidManifest.xml file.
Advertising needs the Internet and checking the current state of the network, so our application will need permissions (we specify in the tag ):

Also, for AdMob to work correctly, you must specify the version of the Google Play Services library used and define the advertising Activity (specify in the tag ):

Now let's move on to the markup file. Previously it looked like this:

And activity_main.xml will look like this:

Don't forget to include the namespace

Xmlns:ads="http://schemas.android.com/apk/res-auto"

so that an error is not generated for unknown ads: adSize and ads: adUnitId.

Ad unit ID for convenience can be added to /res/values/strings.xml in the form:

ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx

Don't forget to insert your real ad ID! You can find it on the Admob website, in the App Management section, by clicking on the inscription in the Ad units column.

@Override protected void onCreate(Bundle savedInstanceState) ( super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //.... AdView mAdView = (AdView) findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().build(); mAdView.loadAd(adRequest); //.... )

And run our application:

We enter "AdMob" into Google and the first site will no longer be AdMob, but Google's site. After switching to it, they will begin to lure you a little to dark side Firebase (recently bought by Google).

Firebase gives pretty extensive opportunities by analytics (at least for me, as a programmer, not a marketer) of advertising in your application (height, weight, country, number of views, Android version where it was installed, etc., etc.).

First of all, it was found, but it is for Eclipse, and after the first attempts to follow the example, warnings about depricated and, in general, errors began.

After reading more information, it became clear that the transition of AdMob to firebase happened recently and you will have to figure it out yourself.

Let's see how to live with it now

Minimum requirements: (with which the article was written).
  • Android Studio 2.2.2
  • Be registered in the Google Developer Console
  • Be registered with AdMob
Step 1
Add dependencies to build.gradle files. First thing in "Module: app":


Now in the second one ("Project: AdMobOnHabr"):


After that, it is recommended to do Tools → Android → "Sync Project with Gradle Files" and compile the project. There is no visible result yet, but the main thing is there are no mistakes? Excellent! Move on.
Step 2
Login to your AdMob account. We choose to manually add the application (if your application is already published on Google Play, use the search in the first tab).


Let's add an ad to our application banner(I suggest that you familiarize yourself with other types). Refresh rate I chose the minimum allowable - 30 sec., Name ad block at your discretion.


Next, you will be prompted to "Set up Firebase Analytics ( not necessary)" - underlined the right word. So far, it's useless skip. We get acquainted with the "instructions for integration", click Ready. After the redirect, we see the page and the long-awaited ID of the ad unit:


Adding ad unit ID in strings.xml:


Don't forget that an ad unit on another Activity needs a new ID.
Step 3
Add an AdView element to activity_admobbanner.xml:


In the attribute "ads:adUnitId" we write the resource from strings.xml with ad unit ID.

A few tips and notes:

Step 4
Initializing the Google Mobile Ads SDK. To do this, you will need an app ID taken from AdMob. Click gear top right → Application management:


Here it is, happiness is the desired app ID:


We write the initialization itself using our app ID:

Step 5
The last action according to Google is to load the long-awaited ad in the AdView element:


On the emulator, following the AdMob policy, you cannot display real ads (only test ads are shown). Pretty logical. But if you have a real device, you can test the ad in action on it and please yourself with success.



It seems that everything was done as written, everything should work, and it’s time for us to go to bed to work on the next feature, but ...
Step 6
Somewhere between the lines You should have read that without google-services.json it won't work. Most likely, you do not have this file yet. Let's search together.

Google kindly provides you with "sheets" of instructions on how to do google-services.json. But I had a question - do you really need to sit and write this file yourself in 2k16, which, on top of everything, is most likely rather stereotyped?

The answer is in the Google Developer Console, where they still thought about the desire of a lazy programmer.

Fill in the fields:


Click Continue. Choose Google Sing-In. Then it's simple - you know your SHA-1 by heart, don't you?


If you suddenly forgot - I can help. SHA-1 can be found using keyltool or a little clumsy - through gradle in the AS itself. Since we don’t want to do unnecessary actions, we will choose the second method:

  1. Click on the Gradle side tab (on the right in the AS window);
  2. Select your project (if necessary, click Refresh);
  3. Open Tasks -> android;
  4. Double click on signingReport;
  5. Switch to text display mode Run console (see screenshot below);
  6. Don't forget to select your application for the build later (and not signingReport);
And here is your SHA-1. Remembered?


Paste the received SHA-1 code, click "Enable Google Sign-In" and "Continue to Generate configuration files".


Well, you get the idea. Download the generated file and copy it to the root directory of the application:


Putting together your project ready. Through similar simple manipulations, your application now has ads.

P.S.: Code in pictures, so that people remember something, and not just copy-pasted in a few seconds.

PhoneGap is a tool that allows you to develop applications in JavaScript and convert them to native applications. mobile platforms(such as Android and iOS). AdMob is a platform for connecting advertising banners to your application for views and clicks on which you can earn money. Here I will tell you how to connect ads from Google AdMob to Android PhoneGap application. To do this, you need to do the following

1. Register with AdMob and get a Publisher ID to connect an advertising banner.
2. Make changes to the Android project to display an advertising banner

1. Registration in AdMob and getting a Publisher ID to connect advertising.

1. Go to the site http://www.google.com/ads/admob/
2. Select Add Site / App from the menu
3. Choose Android App
4. Fill in App Name, Category and App description. It is not necessary to fill in the Android Package URL until our application is on Google Play. Leave this field completely empty. (You need to remove from the field what is already entered there by default - this is market://)
5. Click OK
6. Next, you will see a screen where you are prompted to download the AdMob Android SDK. We'll download the AdMob SDK later, for now, click here Go to Sites/Apps.
7. You now see a list of your applications. Find the app you just added and hover your mouse over its name. You will see the Manage Settings button appear. We press it.
8. Now we see the Publisher ID. its value will need to be inserted as the value of the AdMob_Ad_Unit field in our Android application.

2. Connecting AdMob to an Android project

Download AdMob SDK here

After downloading, you need to put the downloaded file in the libs folder of our android project.


1. If we are working in Intellij Idea, then right-click on the added jar file and select Add as Library...
2. If we are working in Eclipse, then we right-click on the project and select Build Path --> Configure Build Path. Now select the Libraries tab and click the Add Jars button. Choose yourProject/libs/GoogleAdMobAdsSdk-*.*.*.jar

In the main java file of your android application, you need to add the following.
1. Add to import
import com.google.ads.* ; import android.widget.LinearLayout ;

2. Add a constant and a variable to the class
private static final String AdMob_Ad_Unit = "xxxxxxxxxxxxxxx" ; private AdView adView;

3. In the onCreate method after the lines
super .loadUrl(Config.getStartUrl()) ;
add the following lines
adView = new AdView(this , AdSize.BANNER , AdMob_Ad_Unit) ; LinearLayout layout = super .root ; layout.addView(adView) ; AdRequest request = new AdRequest() ; // to run on the emulator, you can uncomment adView.loadAd(request); This is what the main project file looks like for me
import android.os.Bundle ; import org.apache.cordova.* ; import com.google.ads.* ; import android.widget.LinearLayout ; public class MyCoolApp extends DroidGap ( private static final String AdMob_Ad_Unit = "xxxxxxxxxxxxxxx" ; private AdView adView; @Override public void onCreate(Bundle savedInstanceState) ( super .onCreate (savedInstanceState) ; // Set by inconfig.xml super .loadUrl(Config.getStartUrl()) ; //super.loadUrl("file:///android_asset/www/index.html") adView = new AdView(this , AdSize.BANNER , AdMob_Ad_Unit) ; LinearLayout layout = super .root ; layout.addView(adView) ; AdRequest request = new AdRequest() ; //request.addTestDevice(AdRequest.TEST_EMULATOR); adView.loadAd(request); ) )
Add to AndroidManifest to section application following
android:name="com.google.ads.AdActivity" />
You also need to check that AndroidManifest In chapter manifest there were lines

Here's what it looks like AndroidManifest I have
android:versionCode="3" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="com.danilov.mycoolapp" xmlns:android= "http://schemas.android.com/apk/res/android"> android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> android:icon="@drawable/icon" android:label="@string/app_name" > android:configChanges= "orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="Badlibs" android:theme= "@android:style/Theme.Black.NoTitleBar"> "android.intent.category.LAUNCHER" /> android:configChanges= "keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.ads.AdActivity" /> "android.permission.ACCESS_NETWORK_STATE" />

We enter "AdMob" into Google and the first site will no longer be AdMob, but Google's site. After switching to it, you will be gradually lured to the dark side of Firebase (recently bought by Google).

Firebase provides quite extensive analytics (at least for me, as a programmer, not a marketer) of advertising in your application (height, weight, country, number of views, Android version where it was installed, etc. etc.).

First of all, a post was found, but it is for Eclipse, and after the first attempts to follow the example, warnings about depricated and, in general, errors began.

After reading more information, it became clear that the transition of AdMob to firebase happened recently and you will have to figure it out yourself.

Let's see how to live with it now

Minimum requirements: (with which the article was written).
  • Android Studio 2.2.2
  • Be registered in the Google Developer Console
  • Be registered with AdMob
Step 1
Add dependencies to build.gradle files. First thing in "Module: app":


Now in the second one ("Project: AdMobOnHabr"):


After that, it is recommended to do Tools → Android → "Sync Project with Gradle Files" and compile the project. There is no visible result yet, but the main thing is there are no mistakes? Excellent! Move on.
Step 2
Login to your AdMob account. We choose to manually add the application (if your application is already published on Google Play, use the search in the first tab).


Let's add an ad to our application banner(I suggest that you familiarize yourself with other types). Refresh rate I chose the minimum allowable - 30 sec., the name of the ad unit is up to you.


Next, you will be prompted to "Set up Firebase Analytics ( not necessary)" - underlined the right word. So far, it's useless skip. We get acquainted with the "instructions for integration", click Ready. After the redirect, we see the page and the long-awaited ID of the ad unit:


Adding ad unit ID in strings.xml:


Don't forget that an ad unit on another Activity needs a new ID.
Step 3
Add an AdView element to activity_admobbanner.xml:


In the attribute "ads:adUnitId" we write the resource from strings.xml with ad unit ID.

A few tips and notes:

Step 4
Initializing the Google Mobile Ads SDK. To do this, you will need an app ID taken from AdMob. Click gear top right → Application management:


Here it is, happiness is the desired app ID:


We write the initialization itself using our app ID:

Step 5
The last action according to Google is to load the long-awaited ad in the AdView element:


On the emulator, following the AdMob policy, you cannot display real ads (only test ads are shown). Pretty logical. But if you have a real device, you can test the ad in action on it and please yourself with success.



It seems that everything was done as written, everything should work, and it’s time for us to go to bed to work on the next feature, but ...
Step 6
Somewhere between the lines You should have read that without google-services.json it won't work. Most likely, you do not have this file yet. Let's search together.

Google kindly provides you with "sheets" of instructions on how to do google-services.json. But I had a question - do you really need to sit and write this file yourself in 2k16, which, on top of everything, is most likely rather stereotyped?

The answer is in the Google Developer Console, where they still thought about the desire of a lazy programmer.

Fill in the fields:


Click Continue. Choose Google Sing-In. Then it's simple - you know your SHA-1 by heart, don't you?


If you suddenly forgot - I can help. SHA-1 can be found using keyltool or a little clumsy - through gradle in the AS itself. Since we don’t want to do unnecessary actions, we will choose the second method:

  1. Click on the Gradle side tab (on the right in the AS window);
  2. Select your project (if necessary, click Refresh);
  3. Open Tasks -> android;
  4. Double click on signingReport;
  5. Switch to text display mode Run console (see screenshot below);
  6. Don't forget to select your application for the build later (and not signingReport);
And here is your SHA-1. Remembered?


Paste the received SHA-1 code, click "Enable Google Sign-In" and "Continue to Generate configuration files".


Well, you get the idea. Download the generated file and copy it to the root directory of the application:


Putting together your project ready. Through similar simple manipulations, your application now has ads.

P.S.: Code in pictures, so that people remember something, and not just copy-pasted in a few seconds.

Liked the article? Share it