I have MoPub banner ads working (via MoPub Marketplace) in my iOS app. I'm able to show production or test MoPub ads.
I don't understand how to use mediation to serve MoPub + Admob ads. I'm following the MoPub integration guide here https://developers.mopub.com/publishers/mediation/networks/google/
I'm using Cocoapods, so I have these 3 pods in my app:
pod 'mopub-ios-sdk'
pod 'MoPub-AdMob-Adapters', '7.64.0.1'
pod 'Google-Mobile-Ads-SDK'
I'm able to run my app and see MoPub test ads.
I'm reading MoPub's test guide, but it's not clear to me how this works. https://developers.mopub.com/publishers/ios/test/
Questions, sorry for my basic understanding of the setup:
What does the admob integration actually require? I've added the AdMob Adapter & AdMob SDK. I've also updated my
Info.plist with my test AdMob ID. It's not clear to me if I have to
implement the admob UIView in my ViewController or if that is
something the adapter and MoPub mediation handles? What setup do I
need besides adding the Pods & adding the app ID to my Info.plist in
my app?
How do I setup AdMob in MoPub? I'm trying to follow their guide, but it's confusing. I went in MoPub Networks tab and linked Admob using Oauth. Reporting access is enabled. Do I put my Admob add unit ID in "App & ad unit setup" tab? Admob now has two IDs: one for Info.plist, one for actual served ad unit. I also created an Order for Admob as a Network line item.
How do I setup the waterfall? My guess is the Mopub Orders tab. This is confusing since I have a preexisting "MoPub Demo Order" that I think I want to disable? Do I need to add Mopub as a Marketplace line item to my orders?
Overall, I'm pretty confused since this is all new to me. I tried disabling my MoPub ads to test showing my test Admob ads, but it's not working. I'm using test IDs in both the Info.plist & Admob add unit ID (in Mopub). How do I make sure Admob is setup correctly and show test ads in development?
First, your Podfile has both pod 'MoPub-AdMob-Adapters' and pod 'Google-Mobile-Ads-SDK', which isn't necessary because the former has the latter declared as a transitive dependency. So, you only need to add pod 'MoPub-AdMob-Adapters' to your Podfile, and both the adapters and Google's Mobile Ads SDK will be fetched.
In the future, it's best to use the Mediation Integration Tool available at https://developers.mopub.com/publishers/mediation/integrate/ to integrate adapters. Just find the ad networks you are interested in, and hit the toggle button to get the Gradle/CocoaPods configuration to add to your app.
Now, to your questions:
When you use mediation with MoPub, you do not manually add the mediation SDKs or use their APIs. This is because MoPub handles calling the mediation APIs via the adapters, so all your need to do is integrate the adapters (what I said above), and continue using MoPub's APIs to request and serve ads (just as you would for Marketplace ads). As an example, here is the MoPub AdMob adapter for banner. You can see it handles allocating the AdMob UIView, requesting ad, and returning the ad to MoPub's SDK.
Yes, you use the AdMob ad unit IDs (not the application ID that goes into your info.plist) in the "App and ad unit setup" tab. The same applies to other ad networks - you will use their ad unit IDs (also called placements, depending on the network) rather than their application IDs, which typically go into your app.
There is no right or wrong way to set up your waterfall. It all depends on your preference. If you just want to test that your setup with AdMob is working, I suggest creating a simple waterfall like below:
Create a brand new MoPub ad unit ID for banner.
Disable the MoPub Marketplace line item (for testing purposes). You should turn it back on later when deploying your app with MoPub.
Go to the "Networks" tab, and paste your AdMob ad unit ID into the equivalent MoPub ad unit box. Save.
Go to the "Segments" tab > "Global Segment", and enter a high eCPM value for your AdMob ad unit.
Go back to your MoPub ad unit ID in the "Apps" tab. It should now enabled with AdMob.
Plug the MoPub ad unit ID into your app and make an ad request. Check the console/device logs, there should be log messages telling you this ad is served by AdMob.
For more information on what different things mean when setting up your waterfall, check out the developer docs at https://developers.mopub.com/publishers/ui/manage-marketplace/.
Related
I'm having trouble with adMob (like I specified in the title) on my iOS game made with Unity.
I'm using Unity 5.5.5p1 with the adMob plugin.
Everything was fine when I use the testing adUnits, testing ads are showing perfectly, until I use the custom ones pasted from my adMob profile.
I'm building in release mode and my game isn't on the AppStore yet.
Thanks for the attention payed, any suggestion?
First of all, check if there's any whitespaces at the end of your copied ad unit id. It's the most common cause of not showing ads.
If that's fine, then most probably, you are getting no fill matching your custom AdUnit request, which is quite common in admob. If it doesn't get the matching size, it fails to show the ad.
You can see the debug log in the console for your connected device with actual ad id. If it shows, No Fill, then you may get sure that there's no ad currently available in the admob network, matching your given size.
I always prefer using the default sizes of admob, as they are more popular, there's always available ads in the network.
I have successfully added test banner ads to my ios app. The app is linked to Firebase and we've added company tax info to AdMob settings (pending). When I click add an ad unit, the loading spinner never completes even after multiple minutes.
The documentation for creating an ad unit says to access the Monetize tab (https://support.google.com/admob/answer/3052638?hl=en&ref_topic=3052726). This tab does not exist in my console. My console says AdMob Beta. I have also tried to leave AdMob Beta following these instructions following Google admob/answer/7378069 but do not see a Leave AdMob Beta link at the bottom of the AdMob user interface.
Ad Unit Loading Screenshot
Looks like you found or were directed to the Help Center article for the older version of the AdMob interface. You can find updated documentation here:
Set up an app in AdMob
Ad units, ad formats, and ad types
Regarding the issue with Chrome and Safari, are you using an ad blocker with Chrome? If so, it can (as one would expect) block calls and cause errors when using the AdMob user interface.
For those running into this error using Chrome, try a different browser.
Thanks very much Amod for pointing me in the right direction. I was using Chrome. I cleared caches and restarted but ran into the same error using Chrome. However, I was able to successfully add ad units using Safari.
I am having this issue with Admob:
Cannot find an ad network adapter with the name(s):
("com.google.DummyAdapter"). Remember to link all required ad network
adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting
of your build target.
I have read that this could be due to a "no-fill" problem when asking for a network adapter, but this is happening to me only if I try on a real device. If I try it on the simulator, I receive the ads correctly.
Any ideas?
Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.
If you faced with the error above, consider the options below:
There were no ads to be served from any of the networks in the mediation stack.
There are no ads to show in your country or region (If so try via VPN). This would include the AdMob network.
it might just be an issue with your account. Also, please double check your Ad Unit ID. You can try with another account (Ad Unit ID) to be sure about your implementation.
Best
Well, I fixed in a weird way. I read that some people where having this issue due to eCPM being to high or something like that. So, I went to my AdMob configuration to check it and everything seemed fine, but just in case I re-save the settings and violá, ads starting to work again.
This is the steps that I made:
Go to AdMob administration
Click on Monetize tab
Click on your problematic app
On the ad block, click on the link on the mediation column
Click on AdMod Network
Don't change anything, save data again
Hope this works for somebody...
THIS WORKED FOR ME:
Just make sure that "Limit Ad Tracking" is "turned off" in your iPhone's settings under Privacy > Advertising.
And try to Reset your Advertising Identifier.
THIS MAY BE HELPFUL FOR SOMEONE!!!
I got the same error when I used the Ad Unit Ids defined in the AdMob app for testing on my iPhone. Of course the device has to be registered as a Test Device. I was adding the Test Device Id programmatically.
This is where I went a wrong route. The documents has clearly mentioned steps on how to register a device as a Test Device. Instead all that I somehow made my mind to register the device's UDID as the Test Device Id(This is the mistake I made. Now I accept that it is purely my ignorance). After searching through most of the solutions provided in SO, and some of the other blogs, I just wanted to try the AdMob UI to add a test device. There I saw Advertising ID/IDFA which had a link on how to find the advertising ID/IDFA.
AdMob -> Settings -> Test Devices -> Add Test Device
Just to reiterate the steps which fixed the issue for me:
Take/copy the Ad Unit Ids which you defined in your AdMob app
Put those Ad Unit Ids in your code.(I used xcconfig files to separate Dev vs Prod)
Run the app by now you might have setup all your ad plugging code
Check the Xcode console(important), there you will see the Test Device Id suggested by Google. Which will look something like below:
<Google> To get test ads on this device, set:
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = #[ #"2077ef9a63d2b398840261c8221a0c9b" ]; // Pay attention at this bolded id, this is the one which we want.
The above code is in Obj-C. Use the below code in Swift 5+
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = ["2077ef9a63d2b398840261c8221a0c9b"]
Take away: Test Device Identifier is not UDID of the device but the Advertising Identifier. Check this: https://support.google.com/admob/answer/9691433?hl=en#ID
Tip: I used the Dev.xcconfig file to add the Test Device identifiers, so that the Prod.xcconfig is clean without those test device ids and the app can be submitted without any code changes.
/// Extract those test device ids from the xcconfig file.
if let testIDs = self.extractTestDeviceIDs() {
debugPrint("FOUND: test IDs: ", testIDs)
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = testIDs
} else {
debugPrint("NOT FOUND: test IDs")
/// NoOp: This has to be prod environment
/// If the test IDs are not configured, then also Ads should be initialized.
}
GADMobileAds.sharedInstance().start { initStatus in
debugPrint("GAD Ads... Init Status: ", initStatus)
}
I got the error "Cannot find an ad network adapter with the name(s): ("com.google.DummyAdapter")." when i tried to implement a rewarded ad, when i had only a banner ad configured in Admob.
After adding a rewarded ad to admob for the app, the error disapeared.
here is what problem we had. initially we used the same app id and add id for android and ios. Later we thought to analyze them separately and hence created a new ios Add app and created a new add. now in the code we added the newly created add for ios. However we forgot to update the info.plist with the new app id.
Another potential reason:
Caution: If you set up an app-ads.txt file for your app, you need to
also include this line in your app-ads.txt file in order to load ads
using the demo ad units:
google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0
Alternatively, you can enable test devices and use your own ad unit IDs instead.
Source: https://developers.google.com/admob/ios/test-ads#enable_test_devices
Try Setting Other Linker Flags as -ObjC in Linking section of Build Settings.
I'm attempting to get my app to serve interstitial ads (video and static) using a cross-promotional chartboost campaign. I feel as though I've set up everything correctly, because my dashboard on the website indicates that the SDK has been integrated for that app, and when I put the app in test mode, it receives test ads. However, when I turn off test mode, I receive no ads. My app was built in Corona SDK, and I'm using the chartboost plugin made by swipeware, shown here. I'm using the demo project on their github page. I think the problem MUST be with the way my campaigns on chartboost are set up, but I don't know why. Can anyone give me a hint? I've made images out of what shows on my dashboard on Chartboost -- seems to me that campaigns like FE_Stories_4_11_Test, whose details are also shown, should be showing ads nonstop. Is there any reason this wouldn't happen?
https://github.com/swipeware/CoronaChartboostPlugin
I am building a game using the latest (as of date) libGDX nightlies , RoboVM nightlies, and MoPub bindings that are available here. I used MoPub bindings to show AdMob ads, and I managed to show AdMob test ads on iPhone simulator; however, only test ads are shown on the simulator, and I have not specified any code to show test ads.
The question is: is this normal? is it always going to be test ads on simulator? will real ads show normally on devices?
Thank you.
Ahmad,
It is normal to see test ads once you have integrated. You should be able to see actual creatives from AdMob once the ad network is setup within your MoPub dashboard. It would take some refreshes to get the ads cached but then it would be serving to your simulator.
Another way to test the type of creatives that are coming in is to select ‘Test Ad’ in the Inventory tab over at mopub.com. In the Chrome browser, content may be blocked from being loaded. A shield icon in the address bar will appear. Click on the shield and then click on ‘Load unsafe script.’ Then click the ‘Run Again’ button.
You should be using your AdMob's 'Ad Unit ID' and not the 'Legacy Publisher ID.' I know it may be confusing as within MoPub's dashboard it mentions to have the 'Publisher ID' but really it should be the 'Ad Unit ID' from AdMob that should be entered.
Please consult this guide for more info: http://help.mopub.com/customer/portal/articles/1376821-how-to-set-up-updated-admob-revenue-reporting
Do you have marketplace feature enabled and seeing request/impression counts coming in?