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 whether event consent has been granted.
true when event consent is granted, false or undefined otherwise.
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.
Page properties are added to the context of all events, as well
as the properties of the page event. When specified, all properties of
the Page type are required, but can contain empty values.
When event arguments omit explicit campaign attribution, supported UTM
parameters in the returned page URL populate the event campaign context.
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