Following this guide step by step, you can set a Rewarded Popup Tag to display the ads inside your Telegram Mini App.
If you don't have a Monetag account, feel free to create one according to this manual.
Step 2: Add your App to the Self-Service Platform
2.1. Go to the «Telegram Mini Apps» Tab in your Monetag account.
2.2. Fill in general information about your Telegram App: set up its name by providing the link to your application. After filling in the info, click the "Add and Continue" Button.
Alternatively, you can click "+Create new" in the upper right corner of your Monetag dashboard.
Then select "Telegram Mini App" and click "Add new app" button.
Please be sure that the content of your Telegram Mini App does not violate Monetag Terms.
Important Note:
Please ensure you have preliminarily created a Telegram bot (via @BotFather) and the Mini App itself. Also, to work with Monetag, you should have some experience using JavaScript to manage your Telegram Mini App.
Step 3: Create an Ad Tag in the Monetag dashboard
3.1. Click on the "< > Get SDK" button to create all the format's tags inside the dashboard.
All the tags will appear in your dashbord immediately.
Step 4: Add an Ad Tag to your app
4.1. Click on the "Get instrustions" link on the Monetag Dashboard.
4.2. Copy the JS code of the Tag from the window that appeared.
4.3. To connect your Mini App to the Monetag, place the copied script below the <head> tag of your Mini App's source code.
4.4. Copy the In-App Interstitial Tag from the dashboard
Step 5. Insert the In-App Interstitial format code into the platform.
In interstitial format, you don't need to reward a user, so you can call the show function in one row. In catch, you can get errors like errors during showing ads or errors if there is no banner to show. You can handle errors or just do nothing.
// In-App Interstitial
show_9045855({
type: 'inApp',
inAppSettings: {
frequency: 2,
capping: 0.1,
interval: 30,
timeout: 5,
everyPage: false
}
})
This value is decoded as follows:
Show automatically 2 ads within 0.1 hour (6 minutes) with a 30-second interval between them and a 5-second delay before the first one is shown. The last digit 0 means that the session will be saved when you navigate between pages. If you set the last digit as 1, then at any transition between pages, the session will be reset, and the ads will start again.