loadAndTrackInterstitialAd

fun AdTracker.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.

Call via Purchases.sharedInstance.adTracker.

Parameters

context

The context used to load the ad.

adUnitId

The AdMob ad unit ID.

adRequest

The AdRequest to use.

placement

Optional placement identifier used in RevenueCat tracking.

loadCallback

Optional callback to receive load success/failure events.

fullScreenContentCallback

Optional callback for full-screen ad lifecycle events.

onPaidEventListener

Optional paid-event callback. RevenueCat tracking runs first.