have a code to show ads. After I add the game to Yandex games, I need to add code in the game. When you click on the button, show an advertisement. Tell me how and where to insert the code by clicking on the button to view the advertisement. Here is the code
ysdk.adv.showRewardedVideo({
callbacks: {
onOpen: () => {
console.log(‘Video ad open.’);
},
onRewarded: () => {
console.log(‘Rewarded!’);
},
onClose: () => {
console.log(‘Video ad closed.’);
},
onError: (e) => {
console.log(‘Error while open video ad:’, e);
}
}
})
Just use the Yandex extension.
2 Likes