Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promises on AdSession Tracks Issuing #32

Open
anthonyjlmorel opened this issue Nov 13, 2023 · 1 comment
Open

Promises on AdSession Tracks Issuing #32

anthonyjlmorel opened this issue Nov 13, 2023 · 1 comment

Comments

@anthonyjlmorel
Copy link

We are using the client Web SDK in JavaScript to be able to send OMID tracking.

When we are about to close an Ad, due to an User Interaction, we call the method adContext.finish() before closing the Ad. The issue is that we do not know "how long" to wait before closing the Ad to be sure the Track is sent.
On a documentation I found on a Java Client, it is said 1 second. However, we found this a bit random when using this approach.

Is there a way to get a kind of promise to be sure when the track is sent ? Such as:

await adContext.finish();
closeAd();
@nlehrer
Copy link

nlehrer commented Nov 13, 2023

Thanks for reporting this. We have actually recently had some discussion about this exact feature in the OM Working Group, and we agree that a promise or callback-based API would be better. It will not be a trivial feature to implement because currently there is no way for verification scripts to signal back to OM SDK that they are finished sending all pings. We may first introduce a promise-based API that just waits 1 second and then later improve it to actually wait for scripts to finish. I will keep this issue updated with any progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants