Android IMA SDK - Impression Reporting

246 views
Skip to first unread message

Phil Vuollet

unread,
Nov 4, 2020, 2:11:19 PM11/4/20
to Interactive Media Ads SDK
2 Questions about reporting impressions from VAST ads:

1. What is the user agent reported?
2. How can I verify that the impression URLs are being called successfully?

IMA SDK

unread,
Nov 4, 2020, 4:29:09 PM11/4/20
to phil.v...@accuradio.com, ima...@googlegroups.com
Hi Phil,

This forum is the IMA SDK forum and we can only support implementing the IMA SDK into apps. Reporting and successful impression calling are a complex interchange between the server and the SDK. The place to get help server side is the Ad Manager Forum. To see what the SDK produces you can become familiar with the Network tab in a modern browser and look for the "conversions" "impressions"etc.. in the request panel of each call and match them with VAST responses from the ad tag calls. Feel free to reach out to us for SDK side questions.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q277AuD:ref

Phil Vuollet

unread,
Nov 5, 2020, 11:20:57 AM11/5/20
to Interactive Media Ads SDK
Hi Aryeh,

I appreciate the quick reply. I'm going to have to push back a bit on your reply though as it seems to reflect the wrong impression about the consumer's view of the SDK, else we wouldn't be having this discussion in the first place. Maybe the best thing is to add to your documentation to clarify the role of IMA SDK vs Ad Manager stuff.

Here is some additional context:

Documentation on the IMA SDK is sparse, simply saying in the intro page something along the lines of: "Step 6, impression reporting happens." Then going on to say - put it in your code like this and trust that it will work. For the wise, "Trust but verify" is important, but verification is the problem here. The documentation shows steps on how to verify that an ad server works with the IMA SDK, but nothing on how to verify if the IMA SDK works with an ad server (which we do not control).

For some background info: I've been using browser devtools network tabs for almost a decade as well as proxy tools like Fiddler. I didn't want to have to set up something like that or wireshark to validate impression reporting. It seems like it should not be necessary. What does a modern browser have to do with the Android SDK that runs in a native App?

---
There are several issues with the IMA SDK that prevent verification:

1. IMA SDK is one of those abstractions that are quite opaque. For example, we don't even have a practical way to get the raw response from the AdsRequest. I've tried to get it from AdsReponse, but it's not there (null) so it must be consumed by AdsManager and disposed before it's available.

2. Network profiler and logcat in Android Studio was of little help even with the IMA SDK set to debug. It only shows that something happened but does not log the URLs or the reponse codes for those somethings. 

Suggested Solution: Put the AdsReponse in AdsManagerLoadedEvent.

3. It seems like the IMA SDK is actually delegating everything to a JavaScript process or a web given logcat messages like the following:

 D/IMASDK: Sending js message: webViewLoaded [csi]

If that's what's happening here, at least I have something more to go on rather than - no one really knows, it's complicated. It's not that complicated actually, it's events and http calls defined by VAST spec which is actually what's complicated.

Suggested Solution: log the http URLs and response codes.

4. (not related to verification but an issue in general) Did you know that the IMA SDK does not show Companion Ads if the ad has a sequence=1 but the companion ad has no sequence? That's one of the grey areas of VAST, as servers have different interpretations of it because of its complexity and lack of clarity. This complexity of VAST is why we're leaning on Google IMA but even then we might not be able to do so due to the opacity.

Suggested Solution: if there is only 1 ad in the response, ignore sequence.
---

I'll follow through with the Ad Manager discussion as suggested, but if you could possibly point me in the general direction of how network tools in a browser can help me verify it would be greatly appreciated!

Thanks,
Phil

Phil Vuollet

unread,
Nov 5, 2020, 11:22:58 AM11/5/20
to Interactive Media Ads SDK
Follow up: Ads Manager forum is not applicable since we are not talking about server-side implementation of anything, this is about how I can verify that impression reporting is happening via the IMA SDK.

Thanks Again,
Phil

IMA SDK

unread,
Nov 5, 2020, 5:00:14 PM11/5/20
to phil.v...@accuradio.com, ima...@googlegroups.com
Hi Phil,

Thank you for this conversation. I use chrome://inspect/#devices on my Mac for IMA SDK client side Android and for DAI Android I use Charles. The Chrome browser picks up the webView in Android that the SDK uses so you see all the calls to and from the SDK.

DAI requires more careful look through for VAST extraction - look for the id3-events.json and use standard escape character decoders.

You want an option for logging in logcat of all SDK calls. Before I bring this up to the rest of my team, aren't the tools described above more suited to your use case? Request and response are right where you need them and the tools are already set up for this kind of inspection. Setup is a pain but that's a one time deal.

Point #4 looks interesting. If this is an issue for you, could you replicate this in our Sample apps(preferably HTML5 ) and send it to us via "Reply to author"? If all we need to see this is an ad tag then we would look at that instead.

Phil Vuollet

unread,
Nov 17, 2020, 11:22:01 AM11/17/20
to Interactive Media Ads SDK
Thanks Aryeh!

Charles and inspect should work, that is most helpful. Would be great to have something about it in the documentation for the IMA SDK.

4. Confirmed, try it here: https://www.w3schools.com/code/tryit.asp?filename=GKSMO31XVARR

Thanks!
Phil

IMA SDK

unread,
Nov 18, 2020, 2:46:46 AM11/18/20
to phil.v...@accuradio.com, ima...@googlegroups.com

Hi Phil,

I’m with Aryeh’s team and thanks for sharing this information.

As per this IAB document (page 27), it is recommended that you should not add a sequence attribute when your VAST only contains one ad. With regard to companion ads, you may want to check the below excerpt from the above IAB document and add the necessary attributes accordingly.

Companion creative must be served with either Linear or NonLinear creative and cannot be served alone. Also, the element can be served in a VAST response for any other ad format. As long as the attribute, required=”none”, is present the video player can choose to ignore any companion creative included.

Let me know if you have further questions or clarifications.


Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q277AuD:ref

Phil Vuollet

unread,
Nov 18, 2020, 12:25:15 PM11/18/20
to Interactive Media Ads SDK
Sherwin,

I think you're mistaking my example as the actual ad server response. The ad server is AdsWizz which is owned by Pandora, not us. So we don't have control over the VAST XML. I will raise the issue with them, but the IAB spec lends itself to loose interpretation.

The problem is related to the Creative sequence rather than the Ad sequence. Even with a matching sequence and no sequence, the CompanionAd is not loading.

See my example but use ad2.xml, ad3.xml, ad4.xml files for the Url instead of ad.xml. 

ad2.xml - sequence on both creatives
ad3.xml - no sequence on creatives
ad4.xml - no sequence at all

There are no attempts to load an image or otherwise suggest that the IMA SDK did so.

Page 24 of the same spec:

"The <Creative> element may contain a sequence attribute that identifies the numerical order in
which each creative should display. For example, an Ad may wish to play a Linear creative followed by a
NonLinear creative. Values for the sequence attribute in this case would be 1 for the Linear creative
and 2 for the NonLinear creative. Sequential display of creative in the absence of sequence values is at
the video player’s discretion.
General
Implementation Note
The <Creative> sequence attribute should not be confused with the <Ad>
sequence attribute. Creative sequence identifies the sequence of multiple creative
within a single Ad and does NOT define a Pod. Conversely, the <Ad> sequence
identifies the sequence of multiple Ads and defines an Ad Pod. See section 2.3.5 for
details about Ad Pods.
2.2.6.1 Creative Attributes
The following attributes are available for the <Creative> element:
• id: an ad server-defined identifier for the creative
sequence: the numerical order in which each sequenced creative should display (not to be confused
with the <Ad> sequence attribute used to define Ad Pods)
• adId: identifies the ad with which the creative is served
• apiFramework: the technology used for any included API"

Thanks Again,
Phil

IMA SDK

unread,
Nov 19, 2020, 2:00:53 AM11/19/20
to phil.v...@accuradio.com, ima...@googlegroups.com

Hi Phil,

Thanks for your clarification and for adding insight regarding your concern. I tried replicating this scenario using our sample single linear ad tag (removed the sequence number of the companion creative) and tested against our Video Inspector. Indeed, the companion ad is not appearing (attached screenshots).

Let me share this behavior to my teammates to check further and will get back to you once we have our findings.

Regards,

withoutSequenceNumber.png
withSequenceNumber.png

IMA SDK

unread,
Nov 25, 2020, 1:35:42 AM11/25/20
to phil.v...@accuradio.com, ima...@googlegroups.com

Hi Phil,

Hope you are doing well.

Just an update from the team regarding the companions without sequence attribute. This is working as expected. Our recommendation would be to ensure all the companions have a sequence attribute to in order to be served properly. We do not expect the SDK to change this behavior in the case of a single ad.


Regards,


Reply all
Reply to author
Forward
0 new messages