Most free mobile games earn money in two ways: ads and in-app purchases. Both are straightforward to add in Unity, but there are a few steps that people skip and then regret, especially consent for players in the UK and Europe. This guide walks through the process in order.
Tools, SDK versions and store rules change often. Use this as a map, and follow the current official documentation from Google, Apple and Unity for exact steps.
Step 1: decide what you are selling
Before writing code, decide the model:
- Rewarded ads: the player chooses to watch a video for a reward, such as an extra life or a booster. Players tolerate these best, and they are usually the best earner in casual games.
- Banner and interstitial ads: a banner sits on screen, an interstitial fills the screen between levels. They earn money but can annoy players if overused.
- In-app purchases (IAP): coins, boosters, removing ads, or special items.
- Both together: a very common mix. Rewarded ads give free players a way to progress, and purchases are for those who prefer to pay.
Our own puzzle games, for example, use in-app purchases and rewarded ads, which suits the boosters and lives that those games are built around. See them in our games portfolio.
Step 2: add an ad network (AdMob)
Google AdMob is the most common starting point. In outline:
- Create an AdMob account and add your app to get an app ID.
- Create ad units (rewarded, banner, interstitial). Each has an ID.
- Add the Google Mobile Ads plugin for Unity to your project.
- Put the app ID in the plugin settings, so the app does not crash on start.
- Initialise the SDK once, early in the game.
- Load an ad ahead of time, and show it when the player triggers it.
Use test ads while you build
Always use Google's test ad unit IDs or register your device as a test device during development. Never tap your own live ads. Doing so can get an AdMob account suspended for invalid activity.
Design rewarded ads well
- Load the next rewarded ad in the background so it is ready.
- Show a button only when an ad is actually available.
- Give the reward only after the ad's reward callback fires, not when the ad starts.
- Handle failure: if no ad loads, tell the player kindly and do not take anything from them.
Step 3: consent for UK and EEA players
This is the step most beginners miss. If your game shows personalised ads to people in the UK or European Economic Area, you need valid consent first. Google requires publishers using its ad products to collect it through a certified consent management platform. Google provides its own tool for this, the User Messaging Platform (UMP) SDK, which works with AdMob and has a Unity plugin.
In outline:
- Set up a consent message in your AdMob account (under Privacy and messaging).
- Add the UMP SDK to your project.
- On each launch, request consent information, show the form if it is needed, and only then load ads.
- Offer a way for players to change their choice later, for example a "Privacy settings" button in the game's settings screen.
Without this, your ads may stop serving in those regions, and you risk breaking privacy law. Do not hide it away, and do not initialise ad SDKs before the consent step completes.
Children and families
If your game is aimed at children, or mixed-audience, different and stricter rules apply (for example child-directed treatment, family-safe ad content, and limits on data collection). Decide your target age early. A game for children under 13 is a different project from a general game. In our own approach we keep children's games, such as Sound Splash, free of ads and tracking altogether.
Step 4: add in-app purchases
In Unity, the usual route is the Unity In-App Purchasing package, which wraps Google Play Billing and Apple's StoreKit behind one interface.
- Create the products in each store's console (Google Play Console, App Store Connect). Each has an ID, a type and a price.
- Add the IAP package and define the same product IDs in code.
- Use consumables for things players use up (coins, boosters), and non-consumables for one-off unlocks (remove ads).
- Grant the item only after the store confirms the purchase.
- Add a Restore purchases button. Apple requires one for non-consumables, and players expect it.
- Test with each store's test accounts before launch. Do not test with a real card.
Keep prices honest and clear in the interface, and make sure players cannot buy by accident.
Step 5: iOS needs one more step
On iPhone, if you track users across other companies' apps and sites (which most ad networks do for personalised ads), Apple's App Tracking Transparency prompt is required. You must show Apple's permission request and respect the answer. The consent steps for Google's UMP and Apple's ATT are different, and you may need both.
Step 6: update your paperwork
Adding ads and purchases changes what you must tell people:
- Privacy policy: name the ad network, say what data it collects and why, and how to opt out.
- Store privacy forms: Google Play's Data safety form and Apple's privacy labels must declare data collected by your SDKs. See our guide to both.
- app-ads.txt: a small file on your developer website that tells ad buyers which networks may sell your ads. AdMob explains how to create it. This is one reason a real developer website and domain matter.
A short checklist
- Test ad IDs used in development, live IDs only in the release build
- Consent form shown before any ad loads, with a way to change the choice
- Reward granted only on the reward callback
- Purchases verified, and a Restore button present
- Privacy policy, Data safety form and Apple privacy label match what the SDKs really do
- ATT prompt on iOS where it is needed
- Ads never shown to a game built for young children unless you meet the rules for that
If you would like help doing this properly, from the Unity setup to the store forms, get in touch. It is part of our game development service.
