ima sdk shares global scope with different players - corrupts ad settings

88 views
Skip to first unread message

kevin....@stnvideo.com

unread,
Aug 30, 2022, 4:19:53 PM8/30/22
to Interactive Media Ads SDK
We have a publisher that has both our video player and another video player on the same page.

That other video player is turning off cookies via the following code:
window.google.ima.settings.setCookiesEnabled(!1)

However, when they do this, it affects all of our own player's ad calls, setting a co=1 parameter on the call to GAM, which results in no ads being returned.

Why are the settings global? Is it a best practice that I should consider every setting temporary, and force them to my own settings before every ads request, getting into a settings war with any other player on the page that uses the ima sdk?

IMA SDK

unread,
Sep 1, 2022, 3:05:55 AM9/1/22
to kevin....@stnvideo.com, ima...@googlegroups.com

Hello Kevin,

 

Michael here from IMA SDK Team. Thank you for reaching out to us.

 

With regards to your concern, I would like to believe that this happens because you are calling the settings from the window object. Kindly try setting the cookies enabled from the adsLoader itself, check the below sample:

 

adsLoader.getSettings().setCookiesEnabled(false);

 

Additionally, you may also check our documentation for making multiple request as this may help you in your future use cases.

 

Let us know how it goes and if you have further questions.

Regards,

Google Logo
Michael Angelo
IMA SDK Team
 


ref:_00D1U1174p._5004Q2dtXRv:ref

Kevin Brogan

unread,
Sep 1, 2022, 6:17:57 PM9/1/22
to IMA SDK, ima...@googlegroups.com
This will have no effect because adsLoader.getSettings() and ima.settings refer to the same object.

adsLoaderInstance.getSettings() === window.google.ima.settings
returns true 

Do you have any other suggestions that will work?

Kevin Brogan
Senior Developer, STN Video
250.590.1991   |  TF: 1.855.590.1991
kevin....@stnvideo.com



IMA SDK

unread,
Sep 2, 2022, 3:18:50 AM9/2/22
to kevin....@stnvideo.com, ima...@googlegroups.com

Hello Kevin,

 

Thank you for responding back to us.

 

Would you be able to share the sample app implementation where the issue is reproducible for us to test on our end? Kindly include the navigation steps to reproduce the issue and the VAST Ad Tag URL used in the request call.

IMA SDK

unread,
Sep 2, 2022, 3:20:23 AM9/2/22
to kevin....@stnvideo.com, ima...@googlegroups.com

Hello Kevin,

 

In addition to my previous response. Kindly provide the requested information through the process below:

 

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002dtXRvQAM&entry.80707362=00120120

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

 

Should you opt to directly share it on this thread, please send it privately via "Reply To Author" button.

kevin....@stnvideo.com

unread,
Sep 2, 2022, 3:12:49 PM9/2/22
to Interactive Media Ads SDK
replied privately and used the link to upload the example file.

IMA SDK

unread,
Sep 6, 2022, 4:38:02 AM9/6/22
to kevin....@stnvideo.com, ima...@googlegroups.com

Hello Kevin,

 

Confirming the receipt of your response privately. Thank you for sharing the requested information. As this issue is found to be an internal SDK behavior, allow me to raise this concern to the rest of our team to seek their insights. One of them should be able to provide a more concrete solution to your concern. Kindly wait patiently for their response.

Regards,

IMA SDK

unread,
Sep 7, 2022, 10:06:14 AM9/7/22
to ima...@googlegroups.com, kevin....@stnvideo.com
Hi Kevin,

Certain privacy-related IMA settings intentionally operate at the page level because they represent user permissions. These permissions are intentionally global in nature.

In your particular situation, the issue appears to be that the third-party player that you are integrating seems to set that value proactively to an overly restricted level. Ideally that player should offer a manner for you to tell it to allow more permissive settings. If not, it may need to be isolated in its own iframe, to prevent this hijacking.

Thanks,

Greg Schoppe

Kevin Brogan

unread,
Sep 7, 2022, 1:01:42 PM9/7/22
to IMA SDK, ima...@googlegroups.com
Every AdsLoader setting is global. Not just the cookie one I have an issue with. This includes the player name, as I indicated in my sample.

We are 100% unable to isolate the ima sdk in its own iframe because Double Verify will report all inventory as not in view if we do that.
We were isolating the ima sdk before and we were required to bring the sdk back into the main page to get Double Verify to function.

Your documentation says that the settings returned by AdsLoader.getSettings is an instance of the settings, not a global singleton of the settings. Please update your documentation as it is wrong.

I would also suggest that you update your documentation to be explicit about the fact that multiple players on the page from different providers will interfere with each other and is not supported by Google.


IMA SDK

unread,
Sep 12, 2022, 10:30:35 AM9/12/22
to kevin....@stnvideo.com, ima...@googlegroups.com
Hi Kevin,

Thank you for the feedback on our documentation. I've passed it along to our documentation team, so they can work to improve clarity on these points.
Reply all
Reply to author
Forward
0 new messages