loadAndTrackInterstitialAd
fun loadAndTrackInterstitialAd(context: Context, adUnitId: String, adRequest: AdRequest, placement: String? = null, loadCallback: InterstitialAdLoadCallback? = null, fullScreenContentCallback: FullScreenContentCallback? = null, onPaidEventListener: OnPaidEventListener? = null)
Loads an InterstitialAd and automatically tracks RevenueCat ad events.
On success the ad is delivered via loadCallback with full-screen content tracking already wired. Revenue tracking is set up via OnPaidEventListener.
Parameters
context
The context.
adUnitId
The AdMob ad unit ID.
adRequest
The AdRequest to use.
placement
A placement identifier for RevenueCat tracking.
loadCallback
Optional InterstitialAdLoadCallback to receive load results.
fullScreenContentCallback
Optional FullScreenContentCallback to receive full-screen content events. RevenueCat tracking is injected transparently.
onPaidEventListener
Optional OnPaidEventListener to receive paid events. RevenueCat revenue tracking is called first, then forwarded to this listener.