Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Unity Native Ads implementation

40 views
Skip to first unread message

Huy Trương Anh

unread,
Feb 14, 2025, 3:22:15 AMFeb 14
to Google Mobile Ads SDK Developers
Hi, I'm a novice programmer. I'm trying to implement Admob Native Ads in Unity. In your guide I see no mention of refreshment of Native Ads. As refresh of Banner is done automatically, I wonder how should I go on to implement the refresh logic for Native Ads

Mobile Ads SDK Forum Advisor

unread,
Feb 14, 2025, 7:45:34 AMFeb 14
to truonga...@gmail.com, google-adm...@googlegroups.com
Hi,

Thank you for contacting the Mobile Ads SDK Support team.

Only banner ads have the automatic refresh option available in "Advanced settings". Currently, native ads don’t have this feature built-in. However, you can set up a workaround by manually refreshing the ad at specific time intervals.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vH1sD:ref" (ADR-00288334)

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5



Alex

unread,
Feb 14, 2025, 12:39:03 PMFeb 14
to Google Mobile Ads SDK Developers

Unlike banner ads, AdMob Native Ads do not refresh automatically, and you need to implement your own refresh logic. Google recommends not refreshing native ads too frequently, as it can impact user experience and ad performance. However, if you want to refresh them periodically, here’s the best approach:

Steps to Implement Native Ad Refresh in Unity: 1. Load and Display the Native Ad

Make sure you're loading and displaying the ad correctly using AdLoader.

void RequestNativeAd() { AdLoader adLoader = new AdLoader.Builder(adUnitId) .ForUnifiedNativeAd() .Build(); adLoader.OnUnifiedNativeAdLoaded += HandleOnUnifiedNativeAdLoaded; adLoader.LoadAd(new AdRequest.Builder().Build()); } void HandleOnUnifiedNativeAdLoaded(object sender, UnifiedNativeAdEventArgs args) { nativeAd = args.nativeAd; // Display the ad in your UI } 2. Implement a Timer for Refresh

Use InvokeRepeating() or Coroutine in Unity to refresh the ad at a set interval (e.g., every 60 seconds).

void Start() { RequestNativeAd(); InvokeRepeating(nameof(RefreshNativeAd), 60f, 60f); // Refresh every 60 seconds } void RefreshNativeAd() { if (nativeAd != null) { nativeAd.Destroy(); // Destroy the current ad to prevent memory leaks } RequestNativeAd(); // Load a new ad } 3. Follow Google’s Best Practices for Refreshing
  • Do not refresh too frequently (Google recommends 30-120 seconds).
  • Destroy the old ad before loading a new one to free memory.
  • Ensure user interaction isn’t interrupted by the refresh.

This approach ensures your Native Ads refresh efficiently without violating Google’s policies or degrading performance.

Let me know if you need further clarification! 

Reply all
Reply to author
Forward
0 new messages