Where do I find my facebook ad's placement ID? - android

I'm trying to fill the impression gap of my other ad provider with Facebook ads (Facebook audience network) to increase the income of my application.
So far so good, the testing works, I see the facebook test ad on the emulator, however, when it comes to this code:
fbRewardedVideoAd = new RewardedVideoAd(ctx, "YOUR_PLACEMENT_ID");
I simply stuck. Documentation says it is okay for testing but I should replace this with my real placement id which I absolutely cannot find no matter where I'm looking for it and the documentation also fails to state where should I look for it.
So where is this placement id? What is this at all?
Anyone can help?

You can find your placement ID under Monetisation Manager-Properties-Your application. (if you have already created the placement ids)
If you have not created you can create a property first(Link your application) and under it you can create ad space and then property ids.
The document is here - Facebook Business

Related

Facebook Audience Network - Get Ad Placement Id

I'm implementing the Facebook Audience Network SDK across iOS and Android. I set certain flags by checking a dictionary for the existence of an Ad, by looking up the Ads placementId. On iOS you can access this via the delegate methods easily, as below:
- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error
{
NSLog(#"Adview placement id is: %#", adView.placementId);
}
However on Android, the Ad object (in the Ad's listener) doesn't seem to have a placementId property as it's encapsulated. So this is either the usual inconsistencies between third-party SDK's cross platform, or i'm missing something?
Is it possible to retrieve the Ads placement id directly from the Ad object on Android, as you can do on iOS?
(Note: Facebook's docs don't seem to mention it)
Have you checked the AdView object in the Android implementation? it contains the placementId as well.

Google AdMob Code Issue (Running Live Mode ?!)

I signed up for Google AdMob services recently and been using this code to create the AdRequest.
private AdRequest createAdRequest()
{
return new AdRequest.Builder()
.AddTestDevice(AdRequest.TestDeviceSimulator)
.AddTestDevice("0123456789ABCDEF0123456789ABCDEF")
.AddKeyword("game")
.SetGender(Gender.Male)
.SetBirthday(new DateTime(1985, 1, 1))
.TagForChildDirectedTreatment(false)
.AddExtra("color_bg", "9B30FF")
.Build();
}
When logging in today morning, I saw some impression (around 100) created obviously by myself. The TestDevice ID is of course not the correct ID because I was too lazy to find out the correct one.
Are the ads showing right now in my app "real" ads? Can I fix this by adding the correct device ID and will I see then inside App that the Ads are just "Demo"?
... Is there no "general testing-mode" ? I'm developing together with a friend and he has of course a different device ID...
Thanks in advance
You can add multiple device IDs, no problem:
.AddTestDevice("YOURDEVICEIDYOURDEVICEIDYOURDEVICEID")
.AddTestDevice("FRIENDSDEVICEIDFRIENDSDEVICEIDFRIEND")
.AddTestDevice("SOMEONEELSESOMEONEELSESOMEONEELSESOM")
Now your friends and you will see demo ads, all the rest will see real ads.
To get the device id you can start your app and check the logcat for an admob log that looks more or less like this:
05-20 20:27:20.888: I/Ads(32367): Use AdRequest.Builder.addTestDevice("BANANANAANANANANANANNANANANANANA") to get test ads on this device.
Just use this id as a parameter in the addTestDevice method then. See also this related admob question

Send keywords and targeting info to AdMob for better ads

On admob, when I click on Monetize > AdMob Network report and then select "Targeting Type" in the drop-down selection (at the bottom left of the page), I see five lines:
- (Unmatched ad requests)
- (unknown)
- Contextual
- Interest-based
- Placement
Can someone explain me how such results are possible as I am in an Android App and no targeting information is provided to Google (for me, contextual is linked to the environnement of the user in the app like, the text on a webpage for a web-site visitor for example...)
Actually I would like to improve my ECPM by providing keywords and -if useful- user (non-personal) info to Admob as I do not do it yet.
Does anymone have any idea how this could be achieved and how Admob can currently propose keyword-based advertising when I do not provide anything to it? This is a mystery for me :-)
Thanks in advance for the answers!
You can provide keywords to admob so the ads can be targeted. You do this by using the addKeyword function when you create a request. Like this:
AdRequest.Builder builder = new AdRequest.Builder()
.addTestDevice("an id for your device")
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addKeyword("orange")
.addKeyword("yellow")
.addKeyword("blue");
This method is documented here: http://developer.android.com/reference/com/google/android/gms/ads/AdRequest.Builder.html
There you can find other methods to provide information to AdMob: gender, location, birthday...
Here's more information as well: https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate

Android and MoPub integration

I integrate MoPub with Android.
https://github.com/mopub/mopub-android-sdk/wiki/Banner-Integration
But the ads are not displaying, instead of that
Welcome to Mopub!
Click here to test add
You can now setup a new campaign for other adds.
How can I list ads in my app? So that it will be clicked it will be counted against my app.
Seems like your request to Mopub is being reviewed (there is probably a message in box on Marketplace tab saying so). You should wait for it to be done. However, in my case there wasn't any progress for quite a long time (about 2 weeks) until I asked for that the Mopub support. Once the request is checked you'll get ads.
When you create a new account in MoPub, Mopub automatically creates test order with that particular banner:
Welcome to Mopub!
Click here to test add
You can now setup a new campaign for other adds.
To disable this banner and add your own banners, go to https://app.mopub.com/advertise/orders/ , pause "MoPub Demo Order" and add your own orders and line items.
The system works right after the account was created, you don't need to undergo review to disable test banners or add your own banners.
Be sure to test with test ads.
This link of the MoPub documentation will show you how to use test ad id's to get an ad on every request while developing.
To make things easy for you, this is a often used solution making use of the ternary operator. This says IF development THEN use test ad id ELSE use your production ad id.
moPubView = (MoPubView) findViewById(R.id.adview);
moPubView.setAdUnitId(BuildConfig.DEBUG ? "b195f8dd8ded45fe847ad89ed1d016da" : "YOUR_PRODUCTION_BANNER_ID");

onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory when using admob with adwhirl

i just want to know if this problem is server side...or i must fix something in my code...
onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory
I'm using admob with adwhirl to show ads in my android application.
If you are getting this error, then your code is correct. The issue is that AdMob does not always have an ad to return for every request. This may happen particularly if you have just registered your AdMob publisher ID, as it takes some time and multiple requests before the new ID starts returning ads.
Another reason your fill rate may be low is that you don't have AdSense backfill enabled, or you have filtered out some ads. Check your app settings to see if that is the case.
Finally, a test you can run to see if your AdWhirl code is implemented correctly is to request a test ad. You can do this by specifying test mode in AdWhirl:
AdWhirlTargeting.setTestMode(true);
If you get back a test ad, you'll know your code is working as intended.
One of the solutions you could try:
Some times this will happened if you changed language of your Android device to exotic language (Russian for example). Try to change it back to English and AdMob will find appropriate ad for you. Or you could go to the Google Settings->Ads->Reset advertising ID
I've just found that such error is shown if your AdMob account has been banned. But it works with a test device ID.
Note that this might happen aswell if you're using (forcing) a custom width and height for the banners.
You should use the ones that DOC states:
https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#play
If you set a custom width and height like:
new AdSize( 521,300 );
It's going to reply with the error you mentioned.
I know this was from long time ago, but here's something i did which solved this problem.
1. on your admob account, click on "manage settings" in the app you've created.
2. click on "edit".
3. under "Android Package URL:" leave blank, and then save settings.
*after you'll save, it'll show this box as "market://", which is fine.
I had this problem when using Rewarded Interstitial (beta).
Changing to Rewarded solved the problem.

Categories

Resources