adspaw-test
v0.6.3
Published
Looking to grow your business or monetize your traffic? 💰 Whether you're an advertiser seeking effective campaigns or a publisher looking to maximize revenue, we’ve got you covered.
Downloads
2,036
Readme
Introduction
AdsPaw is an advertising platform focused on Telegram MIni app, helping publishers increase revenue through easy integration and smart ad management
Diverse Billing Models
- CPM (Cost Per Mille): Payment occurs per 1000 impressions (CPM),ad prices depend on the user's geographic location;
- CPC (Cost Per Click): Charges per click.
- CPA (Cost Per Action): Charges when a user completes a specific action
Variety of Ad Types
To cater to different content formats and user needs, AdsPaw supports multiple ad formats:
- Image and Text Ads: Combines images and text to capture user attention.
- Video Ads: Enhances user engagement through dynamic content.
- Interstitial ad:Full-screen ad that should appear at natural breakpoints
These ad types can be seamlessly integrated into your app or website.
Ad Scenario
|Ad Scenario|Describe| |:--:|--| |Spin|Spin the wheel to win rare skins, diamonds, and gold coins, and enhance your gaming experience!| |Boost|Give users some boosters, such as a mining multiplier, a speed multiplier, reduce downtime, use an existing booster in your game or create a new one.| |Once more|When players lose in the game, they have the option to obtain ability that allow them to continue playing.| |Check In|When Check in, you can get more rewards by watching ads compared to normal Check-in| |Any Extra rewards|The examples above are not the only possible ones. There may be a more suitable place for advertising in your application.|
Requirements
- Have Telegram mini-apps (TMA)
- Have Ad unit ID
- Have Guid
- Placing ad units in the TMA If you not have GUID and Ad Unit ID , please contact the account manager to obtain the GUID and Ad Unit ID
Insert script
To import through CDN, please include the following script in your program
https://unpkg.com/adspaw@latest/dist/index.min.js
SDK Code
const instanceAds = await window.entryAds(
{
debug?:boolean //Boolean value if set to true you will get response from server with test ad.
guid:string //Your Guide is Necessary
}
); //Get advertising instances in advance
// During the testing phase, passing in parameters can obtain the test advertisement:entryAds('',true)
try {
const done = await instanceAds.show({
onAdShow: () => {
//When the advertisement is successfully displayed
},
onAdClick: () => {
//When an advertisement is clicked
},
onAdComplete: () => {
//When the ADS advertising task is completed
},
});
// done --> The type of done is a Boolean value. If it is true, users can be rewarded (for your app)
// Of course, you can also incorporate the following logic into the onAdComplete callback function
// todo
} catch (error) {
// user get error during playing ad
// do nothing or whatever you want
}
::: important Please ensure that you are currently in a Telegram environment and that entryAds exist in the window :::
Show ads
User clicks the Watch ad Button , such as
- After the ad countdown ends, various monitoring functions will be triggered, where you can issue rewards or do anything else you want.
FAQ
Tips: No ads?
- Before that, we need to loaded Telegram Sdk first(https://telegram.org/js/telegram-web-app.js ).Please check if you are currently in the Telegram Mini App environment
- Ensure the and has user info
- Perhaps your Mini App is waiting for our review
Tips: watch ads too often?
- You need to set a certain time interval in your program, about 20 to 30 seconds(like a countdown?)