How to show interstitial ad after x amount of clicks?

309 views
Skip to first unread message

Adem Redzic

unread,
Mar 15, 2018, 6:04:06 PM3/15/18
to Google Mobile Ads SDK Developers
Hey guys, I'm trying to make a "PlayAgain" button that shows an interstitial ad after the 5th click. I'm using Xcode 8 and Swift. How do I go about approaching this?

mobileadssdk-a...@google.com

unread,
Mar 15, 2018, 11:25:54 PM3/15/18
to Adem Redzic, Google Mobile Ads SDK Developers
Hi there,

You can implement a counter that is incremented every time a user taps on your "Play Again" button. Once the counter reaches a specific limit (in this case, 5), then you can show your Interstitial Ad. To illustrate this:
  1. Increase "counter" by 1 every time the "Play Again" button is tapped
  2. Check if "counter" is greater or equal than your limit (5)
    • If Yes, show your Interstitial Ad and reset your "counter" to 0
    • If No, do nothing
Let me know if this works for you. If you would like further assistance with this, I would suggest you consult a general developer forum, such as StackOverflow, for further assistance since your concern is more with your implementation rather than something specific with the Mobile Ads SDK.

Regards,
Joshua Lagonera
Mobile Ads SDK Team

On 03/16/18 06:04:06 grunty...@gmail.com wrote:
Hey guys, I'm trying to make a "PlayAgain" button that shows an interstitial ad after the 5th click. I'm using Xcode 8 and Swift. How do I go about approaching this?

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/d1766b20-5d31-471b-8948-cc5faa1d9c23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adem Redzic

unread,
Mar 16, 2018, 1:21:36 AM3/16/18
to Google Mobile Ads SDK Developers
Hi Joshua,

Thanks for your reply. I was figuring this too, but I don't know the exact code to write for it. I might go ask on StackOverflow.

-Adem
Reply all
Reply to author
Forward
0 new messages