OptionalappThe application definition used to attribute events to a specific consumer app.
Name of the application.
Version of the application.
The channel that identifies where events originate from (e.g. web, mobile).
OptionalgetFunction used to resolve the locale for outgoing events.
The locale string (e.g. 'en-US'), or undefined if unavailable.
OptionalgetFunction that returns the current page properties.
A Page object containing information about the current page.
Path component of the page URL (e.g., /products/123).
Parsed query parameters for the page.
Referrer URL that led to the current page.
Raw search string including the leading ? (e.g., "?q=test").
Optionaltitle?: stringTitle of the page as seen by the user.
Full URL of the page.
OptionalgetFunction used to obtain the current user agent string when applicable.
A user agent string, or undefined if unavailable.
The client library metadata that is attached to all events.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Configuration options for creating an EventBuilder instance.
Remarks
The configuration is typically provided by the host application to adapt event payloads to the runtime environment (browser, framework, etc.).
Example