Search Unity

How can I tell when user has watched 15 sec of an ad?

Discussion in 'Unity Ads & User Acquisition' started by alphadogware, Feb 17, 2018.

  1. alphadogware

    alphadogware

    Joined:
    Nov 15, 2017
    Posts:
    76
    I have Unity ads setup and have a reward for when my user watches a full ad. This works fine.

    I have another ad type setup that allows the user to skip the ad after 15 seconds.

    Is there anyway that I can verify that the user watched the ad for 15 seconds?

    I have tried to capture the Time.time value before the ad starts and compare to after the ad is skipped, but it appears that Time.time is paused during the ad so it only returns time elapsed in game time.

    I know that I could just rely on the ad skip button not coming up for 15 seconds, but I'd like a secondary check on this before I reward the user.

    Thanks in advance for any help on this topic.
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    The point is that you can control placements, e.g. enabling or changing the skip time, based on user feedback or which placements you see provide best revenue. So it should be sufficient to just check for ShowResult.Skipped return value from the Advertisement.Show() call. See e.g. https://docs.unity3d.com/ScriptReference/Advertisements.Advertisement.Show.html

    During testing of Ads SDK releases, we do validate that e.g. it's not possible to skip an ad before the configured skip time.

    If you still want to check yourself in game, I believe you should be able to use https://docs.unity3d.com/ScriptReference/Time-realtimeSinceStartup.html instead of Time.time

    But as said, it's somewhat against our recommendations to implement code for this in your game as well, as the point is you can configure these parameters server-side after you have released your game, based on which placements you see provides best ads revenue, and perhaps also user feedback.

    Hope it at least answered your question :)

    /Rasmus
     
    alphadogware likes this.
  3. alphadogware

    alphadogware

    Joined:
    Nov 15, 2017
    Posts:
    76
    Real time since startup is what I was looking for. Thanks. I understand about just relying onthe ad settings and then just checking skipped, that's what I'm doing now.

    Thanks again for the reply.