PublisherSetup
From Admob For Developers
Contents |
Publisher Setup
This installation guide will help you setup your AdMob account and install the publisher code.
1. Create Your Account
- Visit www.admob.com to register a new account.
- Provide your payment information at http://www.admob.com/s/my_account/publisher_details
2. Download the Publisher Code
- Login to your AdMob account at www.admob.com.
- If you do not already have a site, create one by going to the "Sites & Apps" tab and clicking "Add mobile site"
- Select your site and click on the "install code" link.
- Copy the publisher code for your desired language.
- Python examples. Since there aren't any provided on the admob publisher code page.
3. Install the Publisher Code
- Place the Publisher code anywhere between the body tags in your mobile site's source code. You can also place the publisher code in its own file and include this file where necessary.
- Enable session tracking
- Configure cookies to improve unique user tracking and ad targeting.
4. Configure Your Request
The code supports both AdMob ad requests as well as Analytics requests. When you download the publisher code from www.admob.com, it is configured to only make ad requests.
Configuration Parameters
| Parameter | Data type | Default Value | Notes |
| PUBLISHER_ID | String | Your publisher id | A unique Publisher ID (e.g. 'axxxxxxxxxxxxxx') is automatically generated for your mobile site when it is created. |
| ANALYTICS_ID | String | Analytics ID required for analytics requests only | |
| AD_REQUEST | Boolean | True | Set to true to make an ad request |
| ANALYTICS_REQUEST | Boolean | False | Set to true to enable analytics (requires an analytics id) |
| TEST_MODE | Boolean | False | Used to test ad requests. Set to true to receive test ads. Set to false to receive real ads. |
5. Start Serving Ads
Make sure TEST_MODE is set to false and you are ready to start serving ads. It may take a few ad requests for you to receive your first ad.
- NOTE: After you send us a request for a live ad (not an AdMob Test Ad), your site status will change to 'Active'. It will revert back to an 'Inactive' status if you stop sending requests in live mode for longer than 48 hours.
FAQ
Q: How do I know I have integrated AdMob ads properly?
When you first load your page with our ad code, be sure to have test mode set to true. If you see a 'AdMob Test Ad' then you have properly integrated our publisher code. Please be sure to set test mode to 'false' when you are ready to show live AdMob ads.
Q: Why is my publisher ID status Inactive?
A: Two hours after you serve your first live ad, the status will change to Active. If you are not able to serve live ads, please check how you've integrated our ad code or email support@admob.com .
