AdMob Pokkt Mediation
Last Update: 4th June, 2018
Pokkt SDK version used: - 7.2.0
AdMob SDK version used: - 11.8.0 (GDPR Compliance)
Download Latest Version Pokkt Mediation.
- Common Steps for AdMob Pokkt Mediation:This is common documentation which is useful for all plugin.
- Native Integration:Check the Steps Mentioned for Native.
- Xamarin Integration:Check the Steps Mentioned for Xamarin.
- AIR Integration:Check the Steps Mentioned for AIR.
- Marmalade Integration:Check the Steps Mentioned for Marmalade.
- ShiVa Integration:There is no separate documentation for this. Please follow “Common AdMob Pokkt Mediation” page.
- Cocos2d-x Integration:There is no separate documentation for this. Please follow “Common AdMob Pokkt Mediation” page.
- Unity3D Integration:There is no separate documentation for this. Please follow “Common AdMob Pokkt Mediation” page.
- Titanium Integration:There is no separate documentation for this. Please follow “Common AdMob Pokkt Mediation” page.
Common Steps for AdMob Pokkt Mediation
- Create account and login at https://apps.admob.com/
- Set up app and create ad units in AdMob dashboard
Step 1: Configure Pokkt Dashboard
- Create Account and login at http://www.pokkt.com
- Register your app here if not registered.
- To use the AdMob Mediation please enter the following details on Pokkt Dashboard:
- Class Name (required): This is the class name that you define inside your application to set up the network. Classname for the network can be set during SDK integration. If you are using Pokkt’s default adaptors for mediation which is given in PokktMediation.jar, then class name will be com.pokkt.thirdparty.AdMobNetwork.
- Test Device Id (optional): For testing AdMob and if you want to see test ad for interstitial then please provide test divide Id. You can add multiple device Id with comma (,) separated without any space.
- ECPM: Put your expected value of ECPM which will in turn rank this network in comparison to other configured networks.
- Screens (required): Here need to provide "AdMob Ad unit ID". First create screen name in Pokkt dashboard which will reflect here as screen name so provide “Ad unit ID’here. Now for getting “Ad unit ID”from AdMob, create new monetize app in AdMob dashboard and open that app then there is a option “New Ad Unit”. So create new ad unit which will generate Ad unit ID and that Ad unit ID you need to provide here. This screen name will map with this Ad unit ID. Please check below screen shot for how to create screen in Pokkt dashboard.
- Reporting (required): Enter publisher id, client id, client secret and Refresh token. You can get it from your AdMob account manager. Please follow https://developers.google.com/adwords/api/docs/guides/authentication for details.
Note: For More Detail, Please follow the below link
- Publisher Id (For Reporting): This is AdMob publisher Id. Once you create AdMob account, in right top corner you will see this publisher id.
- Client Id, Client secret and Refresh token (For Reporting): Please follow the below process
- Open the Google API Console Credentials page.
- From the project drop-down, select an existing project or create a new one.
- On the Credentials page, select Create credentials, then select OAuth client ID.
- Under Application type, choose Web application.
- Under Authorized redirect URIs, add a line with: https://developers.google.com/oauthplayground
- Click Create.
- Take note of the client ID and client secret. Same you need to provide here.
- Go to the OAuth2 Playground via this link, which should pre-populate some key values for you.
- Click the gear icon in the upper right corner and check the box labeled Use your own OAuth credentials (if it isn't already checked).
- Enter the OAuth2 client ID and OAuth2 client secret you obtained above.
- In the section labeled Step 1 - Select & authorize APIs, enter the following URL in
- the text box at the bottom, if it's not already there, then click Authorize APIs:
- If prompted, log in to the account to which you want to grant access and authorization. Otherwise, confirm that the current Google user in the top right corner is the AdWords or manager account for whom you want to obtain credentials.
- A prompt appears indicating your app would like to Manage your AdWords Campaigns. Click Accept to continue.
- In the tab labeled Step 2 - Exchange authorization code for tokens, you should now see an Authorization code. Click Exchange authorization code for tokens
- If all goes well, you should see the Refresh token and Access token filled in for you (you may have to re-expand Step 2 - Exchange authorization code for tokens to see these values).
- Copy the Refresh token into the configuration file for your client library of choice, along with the client ID and client secret. See the instructions above to set configuration options for your client library of choice.
- If you got your client ID and secret only a few minutes ago, and you get an error such as Error: redirect_uri_mismatch, it's possible the changes you made haven't yet propagated. Click the back button in your browser, wait a few minutes, then try clicking Authorize APIs again.
- You need to enable AdSense API so please go to AdSense Management API and enable this.
For more details about AdMob reporting, please see AdMob reporting documentation:
Step 2: Configuration in Application (Native)
- Download the mediation project from POKKT and it is suggested to use the same class file AdMobNetwork(AdMobNetwork.java, AdMobVideoAdManager.java, AdMobBannerManager.java and AdMobInterstitialManager.java) in your project. You have the option to make changes to these classes, in-fact you can create your own custom adaptor for AdMob using our protocol, just make sure to mention the exact name of class in the “class name” box, refer the Step 1.
- Add “Google play services ads framework” into your project. Make sure to update your project's dependencies accordingly.
- Add the necessary permissions for AdMob as suggested in AdMob integration document to your application manifest.
- Add the recommended activitiesand meta datato your AndroidManifest.xmlas suggested in AdMob integration guide.
Follow the below steps to integrate Mediation in Xamarin android project:
- Add downloaded file PokktMediation.dllin your project under reference section.
- You need to download AdMob extension for Xamarin.
- Follow above all process to complete integration.
Follow the below steps to integrate Mediation in AIR android project:
- Add downloaded file PokktMediation.anein your project
- You need AdMob so please google to download AdMob .ane file and and use that.
- Google play service .ane file also required and few of the AdNetwork .ane comes with google play service .ane so be careful with this. We are giving PokktMediation.ane separate GooglePlayService.ANE separate.
- Follow above all process to complete integration and also check our given example specially app.xml file.
Follow the below steps to integrate Mediation in Marmalade android project:
- Check downloaded file which has one mediation project “PokktMediationExtension” and this need to be added in your project as subproject in .mkb file.
- Marmalade is providing AdMob extension “s3eGoogleAdMob” so add this as subproject in .mkb file.
- Follow above all process to complete integration and also check our given example.