ORTB
OMID chapter navigation

Client API overview

live

The Open Measurement Interface Definition (OMID) exposes two client APIs: the session client, used by the integration (ad SDK / publisher) to create and drive a session, and the verification client, used by measurement vendors to subscribe to session events. Within one session the session side produces events and the verification side consumes them.

On this page

What this page will cover

  • Entry cards to the three sub-pages
  • Division of labour and build artefacts of the two clients
  • How official source text and its translation are presented

Chapters in this group

AdSession & session construction

AdSession is the main object of the session client: creation, start / finish, impression and creative-loaded declarations, error reporting, event registration and element bounds updates. The objects needed to construct it — Context / Partner / VerificationScriptResource / OmidVersion — are listed alongside, with the corresponding iOS / Android names. UniversalAdId and VastProperties are referenced by a Context constructor parameter and by AdEvents.loaded(); the JS source exports both (packageExport onto OmidSessionClient) but the official JSDoc site publishes no page for either, so this chapter shows them only as parameter types rather than in their own tables.

  • The full AdSession method table (name / signature / parameters / returns / official description)
  • Session construction parameter objects
Open this chapter

AdEvents & MediaEvents

Event registration is split in two: AdEvents carries the impression (impressionOccurred) and creative load completion (loaded, optionally with VastProperties); MediaEvents carries the 14 media playback events (start, the three quartiles, complete, pause, resume, bufferStart, bufferFinish, skipped, volumeChange, playerStateChange, adUserInteraction). The event type constants live in the AdEventType enum, and most map one-to-one onto VAST tracking events.

  • The AdEvents method table
  • The MediaEvents method table
Open this chapter

VerificationClient

The verification client is what a measurement vendor's verification script uses: registerSessionObserver subscribes to session events, addEventListener subscribes to a specific event type, sendUrl and injectJavaScriptResource perform network requests and script injection in restricted environments, setTimeout / setInterval provide controlled timers, and attest (device attestation) was added in 1.6.0.

  • The full method table
  • Subscription model: session observer versus event listener
Open this chapter

Event payloads & geometry fields

planned

The field-level layout of the sessionStart payload (context, verificationParameters) and of the geometryChange payload (adView / viewport / obstructions), plus which fields are available under full versus limited access mode.

  • sessionStart payload field table
  • geometryChange payload field table
Open this chapter