Start with the four identifiers you are connecting

Most integration mistakes are mapping mistakes. Your Telegram bot launches a production Mini App URL. Monetag registers that Mini App, creates a main zone and generates an SDK function tied to that zone. Your product then creates its own attempt or user identifier for every monetized action. Write those four values down before touching the interface.

The production URL should be HTTPS and should open correctly inside Telegram on Android and iOS. The zone ID comes from the Monetag dashboard, not from a copied example. The generated function name must match the data-sdk attribute. The attempt identifier should belong to your application so you can trace one request from button tap to reward or fallback.

ValueOwned byPurpose
Bot and Mini App URLYour Telegram productOpens the live application inside Telegram
Main zone IDMonetag dashboardConnects ad requests and reporting to the correct placement
Generated show functionMonetag SDK tagPreloads and displays the configured format
ymid / attempt IDYour applicationLinks a monetization event to your logs and reward flow

Create the account, app and zone in that order

A zone is not just a credential. It is also an analytics boundary. If a bonus button and a level-complete placement behave differently, separate tracking with requestVar or distinct zones so one average does not hide the weaker experience. Do not duplicate the same SDK tag across components every time the route changes.

  1. Create a Monetag publisher account

    Use accurate publisher details and review the current terms before adding inventory.

  2. Add the Telegram Mini App

    Submit the real bot or application information and its production HTTPS URL.

  3. Create a main SDK zone

    Choose a format that matches an actual user moment rather than a generic page load.

  4. Copy the generated tag

    Keep the zone ID, source URL and generated function exactly as the dashboard provides them.

  5. Create a separate test zone

    Monetag documents using an additional normal zone for a test version; keep test and production reporting distinct.

Load the SDK once and expose an explicit ready state

For a static Mini App, place the generated JavaScript tag in the document as instructed by Monetag and wait until the global show function exists before enabling the ad action. In React or another component framework, initialize the official integration at a stable application level rather than inside a frequently mounted button or screen.

A loading state prevents the user from tapping a reward before the SDK is available. It also makes failures understandable: the product can show “Bonus unavailable—try again later” instead of silently doing nothing. Always attach a catch path because no inventory, a timeout, a network failure or a configuration error can reject the SDK Promise.

  • One SDK tag per zone
  • A visible loading state while preloading
  • A disabled button until the action is ready
  • A catch handler for every SDK call
  • A normal product path when no ad is available
  • Logs that identify placement, user, device and result

Use preload and show as two product states

Preloading reduces the delay between a user decision and the advertisement. Treat it as preparation, not proof that a reward has been earned. Generate the attempt ID first, preload with that identifier, then use the same identifier when showing the placement. If preload fails, release the interface and offer the normal fallback.

The show call should happen at the moment the user accepts a disclosed exchange. A rewarded popup must be called from a direct user action because browsers and WebViews can block an unsolicited new tab. A rewarded interstitial resolves according to the SDK event model, so your UI must distinguish completed, skipped, rejected and timed-out attempts.

  1. Create the attempt

    Store user, placement, expected reward, creation time and an unused status.

  2. Preload

    Prepare inventory without changing the balance or consuming the action.

  3. Ask for consent

    Show the exact benefit and let the user choose the ad.

  4. Display

    Call the generated function from the intended user moment.

  5. Resolve

    Grant, decline or fall back according to the verified outcome.

  6. Record

    Keep the event result so retries cannot pay the same attempt twice.

Make rewards idempotent and postback-ready

A client-side success callback is useful for interface feedback, but a withdrawable or economically meaningful reward needs stronger bookkeeping. Give each attempt a unique ymid, store whether it has already been applied and reject a duplicate. Monetag documents server postbacks for supported rewarded formats; a public HTTPS endpoint can receive the event and confirm the valued result.

Postbacks may retry when an endpoint does not acknowledge delivery, so the handler must return a successful response after processing and must never issue a second reward for the same ymid. Log the raw request before applying business logic. If telegram_id is absent, rely on the identifier your application created rather than guessing which user completed the event.

Working formulaReward key = zone + placement + unique attempt ID; one successful key can be applied only once

Choose a placement before choosing a frequency

Begin with one placement and a conservative daily cap. Measure the next useful action and next-day return beside revenue. If revenue rises but the cohort stops returning, the placement is consuming future inventory. More calls are not the same as more sustainable monetization.

Product momentRecommended first testAvoid
Optional daily bonusOne rewarded interstitial after the base claimMaking the base claim depend on inventory
Game retryOne opt-in second chance after a failed roundInterrupting active play
Extra energyA capped refill beside time-based recoveryUnlimited farmable rewards
Screen transitionA delayed, frequency-capped in-app interstitialAn ad on every navigation event
WithdrawalNo advertising in the critical transactionUsing an ad as a surprise withdrawal gate

Run the production checklist inside Telegram

A desktop browser test cannot reproduce every Telegram WebView behavior. Test with real accounts and a non-production reward before launch. Then release to a small cohort, compare error and return rates by device, and increase exposure only after the event chain is stable.

  • The Mini App opens over HTTPS from the real bot button
  • The main zone ID matches the generated SDK function
  • The SDK is loaded only once
  • Preload failure restores the normal user path
  • Every Promise has a catch handler
  • Rewarded Popup is triggered directly by a tap
  • ymid stays consistent from preload to show and postback
  • Duplicate callbacks cannot duplicate a reward
  • Android and iOS Telegram WebViews were tested
  • Light and dark themes keep controls visible
  • Frequency does not interrupt onboarding or transactions
  • Placement and revenue events appear in your own analytics

Where Mini Empire shortens the path

Mini Empire lets a creator launch a prepared Telegram Mini App with the application, user system and operating dashboard already connected. A free project can validate the loop using platform branding and monetization. When the project is ready for its own revenue stack, the ownership unlock enables the creator to use supported advertising credentials without rebuilding the audience.

That makes the sequence cleaner: validate the product, create the publisher account, connect the owned placement and measure the result. If you maintain custom code, use Monetag’s official SDK instructions as the technical source of truth; if you use a builder, follow the current credential fields exposed in that product.

Common questions

Does Monetag have an SDK for Telegram Mini Apps?

Yes. Monetag documents one JavaScript SDK for rewarded interstitial, rewarded popup and in-app interstitial formats, with script-tag and modern framework integration paths.

Should I use the main zone or a sub-zone ID?

Monetag’s current SDK documentation says to initialize the SDK with the main zone ID. Confirm the generated tag in your dashboard before deploying.

Do I need to preload ads?

Preloading is recommended for a faster user experience, but it is not a reward event. Handle preload failure and grant value only after the intended completion path.

Can I test in Chrome instead of Telegram?

A normal browser is useful for basic JavaScript debugging, but production behavior must be tested inside Telegram WebView on the devices you support.

Sources and further reading

Technical and product claims were checked against these primary sources.