GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMACompanionDelegate
@protocol IMACompanionDelegate <NSObject>
Delegate to receive events from the companion ad slot.
-
Called when the slot is either filled or not filled.
Parameters
slot
|
the IMACompanionAdSlot receiving the event
|
filled
|
is the slot filled or not
|
-
Called when the slot is clicked on by the user and will
successfully navigate away.
Parameters
slot
|
the IMACompanionAdSlot receiving the event
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eIMACompanionDelegate\u003c/code\u003e protocol enables you to receive events from companion ad slots, like when an ad fills the slot or when a user clicks on it.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two optional methods: \u003ccode\u003ecompanionSlot:filled:\u003c/code\u003e indicates whether an ad successfully filled the slot, and \u003ccode\u003ecompanionSlotWasClicked:\u003c/code\u003e signals when a user clicks the ad and navigates away.\u003c/p\u003e\n"],["\u003cp\u003eBoth methods provide information about the \u003ccode\u003eIMACompanionAdSlot\u003c/code\u003e involved in the event.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMACompanionDelegate\n====================\n\n @protocol IMACompanionDelegate \u003cNSObject\u003e\n\nDelegate to receive events from the companion ad slot.\n- `\n ``\n ``\n `\n\n ### [-companionSlot:filled:](#/c:objc(pl)IMACompanionDelegate(im)companionSlot:filled:)\n\n `\n ` \n Called when the slot is either filled or not filled. \n\n #### Declaration\n\n Swift \n\n optional func companionSlot(_ slot: ../Classes/IMACompanionAdSlot.html, filled: Bool)\n\n Objective-C \n\n - (void)companionSlot:(nonnull ../Classes/IMACompanionAdSlot.html *)slot filled:(BOOL)filled;\n\n #### Parameters\n\n |----------------|--------------------------------------------|\n | ` `*slot*` ` | the IMACompanionAdSlot receiving the event |\n | ` `*filled*` ` | is the slot filled or not |\n\n- `\n ``\n ``\n `\n\n ### [-companionSlotWasClicked:](#/c:objc(pl)IMACompanionDelegate(im)companionSlotWasClicked:)\n\n `\n ` \n Called when the slot is clicked on by the user and will\n successfully navigate away. \n\n #### Declaration\n\n Swift \n\n optional func companionSlotWasClicked(_ slot: ../Classes/IMACompanionAdSlot.html)\n\n Objective-C \n\n - (void)companionSlotWasClicked:(nonnull ../Classes/IMACompanionAdSlot.html *)slot;\n\n #### Parameters\n\n |--------------|--------------------------------------------|\n | ` `*slot*` ` | the IMACompanionAdSlot receiving the event |"]]