Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to track whether a player has finished watching a reward video (appodeal)
Started by Ludvik Sep 16 2019 08:36 AM

5 replies to this topic
appodeal ads monetization

Best Answer agramonte , 17 September 2019 - 04:51 AM

This is what I use but i agree even with my code you should test it and see if it fits your need.

 

I reward when these conditions are met in the call back. I noticed in the latest documentation that the event.data.name property is not listed, but this still works as a few days ago on build 3520 and using the appodeal beta.

event.data ~= nil and event.type == "rewardedVideo" 
and event.data.name == "reward" 
and event.phase == "playbackEnded"

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Ludvik

[GLOBAL: userInfoPane.html]
Ludvik
  • Observer

  • 8 posts
  • Corona SDK

I need to track if player watched ads or not



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

All ad providers should trigger your ad event listener function when ad views are complete. You have to use that listener function to react to the events send by the ad plugin.

 

Rob



[TOPIC: post.html]
#3

Ludvik

[GLOBAL: userInfoPane.html]
Ludvik
  • Observer

  • 8 posts
  • Corona SDK

And how to do it? I know that the Appodeal plugin has adsRequest for the listener. It sounds stupid, but I don’t know how to arrange it :P .I be very thank if you help me



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

This tutorial, while using AdMob for most of its code, discusses everything you need to know about implementing ads. Don't get stuck on the code, all the Ad providers are basically the same. 

 

http://docs.coronalabs.com/tutorial/basics/ads/index.html

 

Then look at the event.phase information for Appodeal which is part of the adRequest event:

 

http://docs.coronalabs.com/plugin/appodeal/event/adsRequest/phase.html

 

you will see "displayed" or "playbackEnded" as a couple of possible event.phase options that you can get when a video is finished. You will have to put some print code in your event listener function, test the various playback options (stopping ads early, letting them play, seeing the difference between rewarded video or interstitial video is handled.

 

Rob


  • OlinaChang likes this

[TOPIC: post.html]
#5

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,245 posts
  • Corona SDK

  Best Answer

This is what I use but i agree even with my code you should test it and see if it fits your need.

 

I reward when these conditions are met in the call back. I noticed in the latest documentation that the event.data.name property is not listed, but this still works as a few days ago on build 3520 and using the appodeal beta.

event.data ~= nil and event.type == "rewardedVideo" 
and event.data.name == "reward" 
and event.phase == "playbackEnded"

  • OlinaChang likes this

[TOPIC: post.html]
#6

Ludvik

[GLOBAL: userInfoPane.html]
Ludvik
  • Observer

  • 8 posts
  • Corona SDK

 

This is what I use but i agree even with my code you should test it and see if it fits your need.

 

I reward when these conditions are met in the call back. I noticed in the latest documentation that the event.data.name property is not listed, but this still works as a few days ago on build 3520 and using the appodeal beta.

event.data ~= nil and event.type == "rewardedVideo" 
and event.data.name == "reward" 
and event.phase == "playbackEnded"

Thank , this really work!




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: appodeal, ads, monetization