This post is Day #28 in a series called the 31 Days of Windows Phone.
Yesterday, I wrote about how to get your application into the marketplace. Today, I’m going to cover how to monetize your trial versions, or your free applications through the use of the advertising control.
Where Do I Get Started?
The place you’re going to want to get started is the Microsoft Advertising pubCenter. They will walk you through getting the SDK, registering your application, and implementing the ads in your application. But, because this is a series on development, I’m going to show you the implementation here, as well.
Adding the Ad Control To Your App
First, you need to GET the control. If you completely skipped the link from my previous paragraph, you haven’t downloaded it. You can get it here:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b0f00afc-9709-4cc2-ba2c-57728db6cbd6
Once you have added the .DLL to your project, you’ll be able to start adding ad controls to your app. (If you need help getting this assembly into your project, there’s a walkthrough on Day #16: Panorama Control.
Once you’ve got the control available to your project, it’s as simple as any other control. Here’s what it looks like on a XAML page:
<ad:AdControl AdUnitId="Image480_80" ApplicationId="test_client" />
As you can see above, there are two required values for an AdControl. AdUnitId, and ApplicationId. You get both of these values by registering your application in the Microsoft Advertising pubCenter, and creating a new Ad Unit.
Using Test Values In Your AdControl
While we’re testing, we shouldn’t use our ACTUAL AdUnitId values, because that would be like illegally clicking on our banner ads on a web page. The AdControl is smart enough to recognize when it’s running in the emulator, and won’t show ads in that case. Instead, you should use the values in my example above. There’s actually 3 different types of test values, depending on what size/shape of ads you want to show. Here’s the whole list:
Ad Type | Ad Model | Size (W x H) | Test ApplicationId | Test AdUnitId |
Text Ad | Contextual | 480 x 80 | test_client | TextAd |
XXL Image Banner | Contextual | 480 x 80 | test_client | Image480_80 |
XL Image Banner | Contextual | 300 x 50 | test_client | Image300_50 |
For my purposes, as you saw above, I am using the 480 x 80 XXL Image Banner. This will take up the bottom 80 pixels of my application’s screen, showing ads from my specific ad unit.
What Is An Ad Unit?
Ad Units are specific “campaigns” that you might want to run. For example, I have an application called “Toothbrush Timer”.” It’s meant to show kids how long to brush each region of their mouths. Because I’m expecting parents to put it on the counter, and watch it with their kids as they brush, advertising seems like a perfect way to catch their eye.
The best part about the Ad Units is the ability to define Categories of advertisements to be shown. In my example, I want to show ads that are relevant to parents and their children. Thankfully, there are tons of different ad categories to choose from (there’s 385!), and you can even have multiple categories (up to 3) in one Ad Unit. Here’s a look at the list:
Law, Gov’t & Politics – All Law, Gov’t & Politics – Commentary Law, Gov’t & Politics – Politics Law, Gov’t & Politics – U.S. Government Resources Law, Gov’t & Politics – Legal Issues Law, Gov’t & Politics – Immigration Shopping – All Shopping – Coupons Shopping – Contests & Freebies Shopping – Engines Shopping – Comparison Real Estate – All Real Estate – Buying/Selling Homes Real Estate – Architects Real Estate – Apartments Hobbies & Interests – All Hobbies & Interests – Woodworking Hobbies & Interests – Video & Computer Games Hobbies & Interests – Stamps & Coins Hobbies & Interests – Screenwriting Hobbies & Interests – Scrapbooking Hobbies & Interests – Sci-Fi & Fantasy Hobbies & Interests – Roleplaying Games Hobbies & Interests – Radio Hobbies & Interests – Photography Hobbies & Interests – Painting Hobbies & Interests – Needlework Hobbies & Interests – Home Recording Hobbies & Interests – Guitar Hobbies & Interests – Comic Books Hobbies & Interests – Collecting Hobbies & Interests – Cigars Hobbies & Interests – Chess Hobbies & Interests – Card Games Hobbies & Interests – Candle & Soap Making Hobbies & Interests – Boardgames/Puzzles Hobbies & Interests – Birdwatching Hobbies & Interests – Beadwork Hobbies & Interests – Arts & Crafts Hobbies & Interests – Art/Technology Hobbies & Interests – Magic & Illusion Hobbies & Interests – Jewelry Making Hobbies & Interests – Investors & Patents Hobbies & Interests – Getting Published Hobbies & Interests – Genealogy Hobbies & Interests – Freelance Writing Hobbies & Interests – Drawing/Sketching Travel – All Travel – South America Travel – National Parks Travel – Mexico & Central America Travel – Hotels Travel – Honeymoons/Getaways Travel – Greece Travel – France Travel – Africa Travel – Adventure Travel Travel – United Kingdom Travel – Traveling with Kids Travel – Theme Parks Travel – Spas Travel – Japan Travel – Italy Travel – Europe Travel – Eastern Europe Travel – Cruises Travel – Caribbean Travel – Canada Travel – Camping Travel – By US Locale Travel – Business Travel Travel – Budget Travel Travel – Bed & Breakfasts Travel – Australia & New Zealand Travel – Air Travel Food & Drink – All Food & Drink – Wine Food & Drink – Vegetarian Food & Drink – Vegan Food & Drink – Mexican Cuisine Food & Drink – Japanese Cuisine Food & Drink – Italian Cuisine Food & Drink – Health/Low Fat Cooking Food & Drink – French Cuisine Food & Drink – Food Allergies Food & Drink – Dining Out Food & Drink – Desserts & Baking Food & Drink – Cuisine Specific Food & Drink – Coffee/Tea Food & Drink – Cocktails/Beer Food & Drink – Chinese Cuisine Food & Drink – Cajuns/Creole Food & Drink – Barbecues & Grilling Food & Drink – American Cuisine Technology & Computing – All Technology & Computing – Windows Technology & Computing – Web Search Technology & Computing – Web Design/HTML Technology & Computing – Web Clip Art Technology & Computing – Visual Basic Technology & Computing – Unix Technology & Computing – Shareware/Freeware Technology & Computing – Entertainment Technology & Computing – Portable Technology & Computing – PC Support Technology & Computing – Palmtops/PDAs Technology & Computing – Network Security Technology & Computing – Net for Beginners Technology & Computing – Net Conferencing Technology & Computing – MP3/MIDI Technology & Computing – Mac Support Technology & Computing – Mac OS Technology & Computing – Linux Technology & Computing – Animation Technology & Computing – 3-D Graphics Technology & Computing – JavaScript Technology & Computing – Java Technology & Computing – Internet Technology Technology & Computing – Home Video/DVD Technology & Computing – Graphics Software Technology & Computing – Email Technology & Computing – Desktop Video Technology & Computing – Desktop Publishing Technology & Computing – Databases Technology & Computing – Data Centers Technology & Computing – Computer Reviews Technology & Computing – Computer Peripherals Technology & Computing – Computer Networking Technology & Computing – Computer Certification Technology & Computing – Cell Phones Technology & Computing – Camcorders Technology & Computing – Cameras Technology & Computing – C/C++ Technology & Computing – Antivirus Software Health & Fitness – ALL Health & Fitness – AIDS/HIV Health & Fitness – Women’s Health Health & Fitness – Weight Loss Health & Fitness – Thyroid Disease Health & Fitness – Substance Abuse Health & Fitness – Smoking Cessation Health & Fitness – Sleep Disorders Health & Fitness – Sexuality Health & Fitness – Senior Health Health & Fitness – Psychology/Psychiatry Health & Fitness – Physical Therapy Health & Fitness – Pediatrics Health & Fitness – Disorders Health & Fitness – Panic/Anxiety Health & Fitness – Orthopedics Health & Fitness – Nutrition Health & Fitness – Men’s Health Health & Fitness – Infertility Health & Fitness – Incontinence Health & Fitness – Incest/Abuse Support Health & Fitness – IBS/Crohn’s Disease Health & Fitness – Holistic Healing Health & Fitness – Herbs for Health Health & Fitness – Heart Disease Health & Fitness – Headaches/Migraines Health & Fitness – GERD/Acid Reflux Health & Fitness – Epilepsy Health & Fitness – Diabetes Health & Fitness – Dermatology Health & Fitness – Depression Health & Fitness – Dental Care Health & Fitness – Deafness Health & Fitness – Cold & Flu Health & Fitness – Chronic Pain Health & Fitness – Syndrome Health & Fitness – Chronic Fatigue Health & Fitness – Cholesterol Health & Fitness – Cancer Health & Fitness – Brain Tumor Health & Fitness – Bipolar Disorder Health & Fitness – Autism/PDD Health & Fitness – Asthma Health & Fitness – Arthritis Health & Fitness – Alternative Medicine Health & Fitness – Allergies Health & Fitness – A.D.D. Health & Fitness – Exercise Style & Fashion – All Health & Fitness – Clothing Health & Fitness – Jewelry Health & Fitness – Fashion Health & Fitness – Accessories Health & Fitness – Body Art Health & Fitness – Beauty Family Planning – All Family Planning – Eldercare Family Planning – Special Need Kids Family Planning – Pregnancy Family Planning – Parenting Teens Family Planning – Parenting-K-6 Kids Family Planning – Family Internet Family Planning – Daycare/Pre-School Family Planning – Babies & Toddlers Family Planning – Adoption Sports – All Sports – Football Sports – Fly Fishing Sports – Figure Skating Sports – Cricket Sports – Climbing Sports – Cheerleading Sports – Canoeing/Kayaking Sports – Boxing Sports – Bodybuilding Sports – Bicycling Sports – World Soccer Sports – Waterski/Wakeboarding Sports – Walking Sports – Volleyball Sports – Tennis Sports – Table Tennis/Ping Pong Sports – Swimming Sports – Surfing/Bodyboarding Sports – Snowboarding Sports – Skiing Sports – Skateboarding Sports – Scuba Diving Sports – Saltwater Fishing Sports – Sailing Sports – Running/Jogging Sports – Rugby Sports – Rodeo Sports – Pro Ice Hockey Sports – Pro Basketball Sports – Power & Motorcycles Sports – Paintball Sports – Olympics Sports – NASCAR Racing Sports – Mountain Biking Sports – Martial Arts Sports – Inline Skating Sports – Hunting/Shooting Sports – Horses Sports – Horse Racing Sports – Golf Sports – Game & Fish Sports – Freshwater Fishing Sports – Baseball Sports – Auto Racing Uncategorized – All Uncategorized – Blind/no site list Pets – All Pets – Veterinary Medicine Pets – Reptiles Pets – Large Animals Pets – Dogs Pets – Cats Pets – Birds Pets – Aquariums Careers – All Careers – Career Advice Careers – U.S. Military Careers – Telecommuting Careers – Scholarships Careers – Nursing Careers – Resume Writing/Advice Careers – Job Search Careers – Job Fairs Careers – Financial Aid Careers – College Careers – Career Planning Science – All Science – Weather Science – Botany Science – Geography Science – Space/Astronomy Science – Physics Science – Paranormal Phenomena Science – Geology Science – Chemistry Science – Biology Science – Astrology Business – All Business – Metals Business – Marketing Business – Logistics Business – Human Resources Business – Green Solutions Business – Government Business – Forestry Business – Construction Business – Business Software Business – Biotech/Biomedical Business – Agriculture Business – Advertising Society – All Society – Ethnic Specific Society – Weddings Society – Teens Society – Senior Living Society – Marriage Society – Gay Life Society – Divorce Support Society – Dating Home & Garden – All Home & Garden – Remodeling & Construction Home & Garden – Landscaping Home & Garden – Interior Decorating Home & Garden – Home Theater Home & Garden – Home Repair Home & Garden – Gardening Home & Garden – Environmental Safety Home & Garden – Entertaining Home & Garden – Appliances Automotive – All Automotive – Wagon Automotive – Vintage Cars Automotive – Trucks & Accessories Automotive – Sedan Automotive – Road Side Assistance Automotive – Pickup Automotive – Performance Vehicles Automotive – Off-Road Vehicles Automotive – Motorcycles Automotive – MiniVan Automotive – Luxury Automotive – Hybrid Automotive – Hatchback Automotive – Electric Vehicle Automotive – Diesel Automotive – Crossover Automotive – Coupe Automotive – Convertible Automotive – Certified Pre-Owned Automotive – Car Culture Automotive – Buying/Selling Cars Automotive – Auto Repair Automotive – Auto Parts Personal Finance – All Personal Finance – Tax Planning Personal Finance – Stocks Personal Finance – Retirement Planning Personal Finance – Options Personal Finance – Mutual Funds Personal Finance – Investing Personal Finance – Insurance Personal Finance – Hedge Fund Personal Finance – Financial Planning Personal Finance – Financial News Personal Finance – Credit/Debit & Loans Personal Finance – Beginning Investing Arts & Entertainment – All Arts & Entertainment – Television Arts & Entertainment – Music Arts & Entertainment – Movies Arts & Entertainment – Humor Arts & Entertainment – Fine Art Arts & Entertainment – Celebrity Fan/Gossip Arts & Entertainment – Books & Literature News – All News – Local News News – National News News – International News Religion & Spirituality – All Religion & Spirituality – Pagan/Wiccan Religion & Spirituality – Latter-Day Saints Religion & Spirituality – Judaism Religion & Spirituality – Islam Religion & Spirituality – Hinduism Religion & Spirituality – Christianity Religion & Spirituality – Catholicism Religion & Spirituality – Buddhism Religion & Spirituality – Atheism/Agnosticism Religion & Spirituality – Alternative Religions Education – All Education – Studying Business Education – Special Education Education – Private School Education – K-6 Educators Education – Homework/Study Tips Education – Homeschooling Education – Graduate School Education – Language Learning Education – English as a 2nd Language Education – Distance Learning Education – College Life Education – College Administration Education – Art History Education – Adult Education Education – 7-12 Education
So, once you’ve created some Ad Units in the pubCenter, grab those AdUnitId and ApplicationId values, and plug them into your AdControl. Then your code, fully formatted, should look more like this:
<ad:AdControl x:Name="AdBox" AdUnitId="10018171" ApplicationId="350b8257-d92a-4978-a218-f3650bd485df" Margin="-12,528,-12,0" Width="480" Height="80" />
And here’s what the ad looks like in my application:
Finally, Profit.
Just by adding this control to your application (assuming your application is actually downloaded by users), you should start seeing activity in the pubCenter. It will show impressions, click-throughs, and other reporting metrics. The most important number shows up right as you enter the site, though: revenue.
So get started showing ads in your application. This is especially handy when you use ads in conjunction with the IsTrial mode that we talked about on Day #23. Show ads before they’ve paid, and hide them afterwards.
Only 3 more days of this series to go…what’s been your favorite day so far?
Download the Code
This simple example just shows an AdControl on a XAML page. But if you need to see how it’s done, this is definitely the example for you.
Leave a Reply