googleads / googleads-mobile-android-mediation

Sample Android project showcasing how to build a mediation adapter or custom event for the Google Mobile Ads SDK.
Apache License 2.0
242 stars 198 forks source link

Wrong impression tracking for Custom Event #500

Open RomanDorofeyev opened 11 months ago

RomanDorofeyev commented 11 months ago

When using Custom event implementation we got impression callback together with loaded Is there is a “hidden” logic in Google Ads SDK that is calls impression callback at the same time with the loaded callback (or even before loaded)? Easy to reproduce: just remove banner insertion and request the ad. Google Ads SDK triggers impression callback once the ad provider notify about adLoaded event even without adding it to view hierarchy

Screenshot 2023-11-03 at 12 52 06
NVentimiglia commented 11 months ago

@RomanDorofeyev

It is expected that the two events occurred at the same time if you load a banner on the screen. When the ad is loaded the OnAdLoaded event is fired, and when it is visible (usually immediately after load) the OnAdImpression is fired.

RomanDorofeyev commented 10 months ago

@NVentimiglia thank you for your response, but I do not think you read my message

Google Ads SDK triggers impression callback once the ad provider notify about adLoaded event even without adding it to view hierarchy

NVentimiglia commented 9 months ago

Hi @RomanDorofeyev

That is correct, adLoaded is triggered once the SDK receives an ad response and this may before the ad is rendered in view.

RomanDorofeyev commented 9 months ago

Hey @NVentimiglia Here is a note from Google docs. And it works as described for Google ads, but doesn't work this way for 3rd party networks integrated via custom adapter.

Google Ad Manager counts mobile app impressions in alignment with industry standards. A mobile app impression is counted when one or more pixels of the ad creative is visible on a device's screen. Currently, Ad Exchange creatives, some Ad Manager creative formats, and Open Bidding use this methodology.