Search code examples
admobinterstitial

Is there a way to set the interstial AdUnitID in AdMob after loading the ad?


We use a different ad ID for each piece of content in our game so that we can track which piece of content an ad was shown for (long story). I'd like to start pre-loading the ad before I know which piece of content the user has selected. The problem is that I get an exception if I don't set the AdUnitID before loading the ad. I haven't found a way to do this, and I wonder if you have?


Solution

  • There is no way. The AdUnitId is what determines what ads to supply. If you don't specify it

    1. Admob can't determine what ads to send you
    2. Admob can't determine who to pay for any click on an ad (if it did somehow send you one).