ReadonlyapiShared Optimization API client instance.
ReadonlyconfigResolved core configuration.
ReadonlyeventShared event builder instance.
ReadonlyflagsStatic resolver for evaluating optimized custom flags.
Build a flattened map of flag keys to values from a change list.
Optionalchanges: {The change list returned by the optimization service.
Key identifying the subject of the change.
Metadata describing the originating experience and variant index.
Identifier of the personalization or experiment experience.
Index of the variant within the experience configuration.
Discriminator for a variable change.
New value for the variable identified by ChangeBase.key.
A map of flag keys to their resolved values.
ReadonlyinterceptorsLifecycle interceptors for events and state updates.
ReadonlymergeStatic resolver for merge-tag lookups against profile data.
Look up a merge-tag value from a profile using normalized selectors.
Merge-tag identifier.
Optionalprofile: {Profile from which to resolve the value.
List of audience identifiers that this profile currently belongs to.
Primary identifier of the profile.
Geo-location information associated with the profile.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Random value associated with the profile.
Aggregated session statistics for the profile.
Duration of the active session.
Average session duration across all sessions represented by this record.
Number of sessions associated with this profile or identifier.
Unique identifier for this session statistics record.
Indicates whether the visitor has been seen before.
Landing page for the session.
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.
Stable, long-lived identifier of the profile.
Traits describing the profile (user-level attributes).
A stringified primitive if found; otherwise undefined.
Generate a list of candidate selectors for a merge-tag ID.
Merge-tag identifier (segments separated by _).
Array of dot-path selectors to try against a profile.
Resolve the display value for a merge-tag entry using the provided profile,
falling back to the entry's configured nt_fallback when necessary.
The merge-tag entry to resolve.
Optionalnt_fallback?: stringFallback value to use when the merge tag cannot be resolved.
Internal identifier of the merge tag.
Human-readable name of the merge tag.
Contentful metadata, including tags.
System fields extended to constrain the content type to nt_mergetag.
Optionalprofile: {Optional profile used for lookup.
List of audience identifiers that this profile currently belongs to.
Primary identifier of the profile.
Geo-location information associated with the profile.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Random value associated with the profile.
Aggregated session statistics for the profile.
Duration of the active session.
Average session duration across all sessions represented by this record.
Number of sessions associated with this profile or identifier.
Unique identifier for this session statistics record.
Indicates whether the visitor has been seen before.
Landing page for the session.
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.
Stable, long-lived identifier of the profile.
Traits describing the profile (user-level attributes).
The resolved string, or undefined if the entry is invalid and no
fallback is available.
ReadonlyoptimizedStatic resolver for optimized Contentful entries.
Find the optimization entry corresponding to one of the selected experiences.
Object containing the baseline optimized entry and the selections.
When true, skip type/shape validation for perf.
The matching OptimizationEntry, or undefined if not found/invalid.
Optionalnt_audience?: The audience of the optimization (Audience).
Optionalnt_config?: The configuration of an OptimizationEntry (JSON).
Optionalnt_description?: string | nullThe description of the optimization (Short Text).
The optimization/experience ID related to this optimization entry.
The name of the optimization (Short Text).
The type of the optimization (nt_experiment | nt_personalization).
Optionalnt_variants?: (All used variants of the optimization (Contentful references to other Content Types).
Contentful metadata, including tags.
System-managed properties describing the entry.
Look up the selection metadata for a specific optimization entry.
Object with the target optimization entry and selections.
When true, skip type checks.
The matching SelectedOptimization, if present.
Identifier of the personalization or experiment experience.
Optionalsticky?: booleanIndicates whether this optimization selection is sticky for the user.
Index of the selected variant within the experience configuration.
Mapping of baseline entry IDs to their selected variant entry IDs.
Get the replacement variant config for the given selection index.
Baseline entry, optimization entry, and 1‑based variant index.
When true, skip type checks.
The EntryReplacementVariant for the component, if any.
Optionalhidden?: booleanIndicates whether this variant is hidden from allocation/traffic.
Unique identifier for the variant.
Resolve the concrete Contentful entry that corresponds to a selected variant.
Entry skeleton type.
Chain modifiers.
Locale code.
Optimization entry and selected variant.
When true, skip type checks.
The resolved entry typed as Entry or undefined.
Get the value of a custom flag derived from a set of optimization changes.
The flag key to resolve.
Optionalchanges: {Optional change list to resolve from.
Key identifying the subject of the change.
Metadata describing the originating experience and variant index.
Identifier of the personalization or experiment experience.
Index of the variant within the experience configuration.
Discriminator for a variable change.
New value for the variable identified by ChangeBase.key.
The resolved JSON value for the flag if available.
Resolve a merge-tag value from the given entry node and profile.
The merge-tag entry node to resolve.
Optionalnt_fallback?: stringFallback value to use when the merge tag cannot be resolved.
Internal identifier of the merge tag.
Human-readable name of the merge tag.
Contentful metadata, including tags.
System fields extended to constrain the content type to nt_mergetag.
Optionalprofile: {Optional profile used for value lookup.
List of audience identifiers that this profile currently belongs to.
Primary identifier of the profile.
Geo-location information associated with the profile.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Random value associated with the profile.
Aggregated session statistics for the profile.
Duration of the active session.
Average session duration across all sessions represented by this record.
Number of sessions associated with this profile or identifier.
Unique identifier for this session statistics record.
Indicates whether the visitor has been seen before.
Landing page for the session.
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.
Stable, long-lived identifier of the profile.
Traits describing the profile (user-level attributes).
The resolved value (typically a string) or undefined if not found.
Convenience wrapper for sending an identify event through the Experience path.
Identify builder arguments.
The resulting OptimizationData for the identified user.
Convenience wrapper for sending a page event through the Experience path.
Page view builder arguments.
The evaluated OptimizationData for this page view.
Resolve a Contentful entry to the appropriate optimized variant (or return the baseline entry if no matching variant is selected).
Entry skeleton type.
Locale code.
The baseline entry to resolve.
OptionalselectedOptimizations: {Optional selected optimization array for the current profile.
Identifier of the personalization or experiment experience.
Optionalsticky?: booleanIndicates whether this optimization selection is sticky for the user.
Index of the selected variant within the experience configuration.
Mapping of baseline entry IDs to their selected variant entry IDs.
ResolvedData containing the resolved entry and selected optimization metadata (if any).
Resolve a Contentful entry to the appropriate optimized variant (or return the baseline entry if no matching variant is selected).
Entry skeleton type.
Chain modifiers.
Locale code.
The baseline entry to resolve.
OptionalselectedOptimizations: {Optional selected optimization array for the current profile.
Identifier of the personalization or experiment experience.
Optionalsticky?: booleanIndicates whether this optimization selection is sticky for the user.
Index of the selected variant within the experience configuration.
Mapping of baseline entry IDs to their selected variant entry IDs.
ResolvedData containing the resolved entry and selected optimization metadata (if any).
Convenience wrapper for sending a screen event through the Experience path.
Screen view builder arguments.
The evaluated OptimizationData for this screen view.
ProtectedsendChannel from which the event originated.
Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this event is an alias event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Channel from which the event originated.
Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this event is a group event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Channel from which the event originated.
Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Traits describing the user.
Discriminator indicating that this event is an identify event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Channel from which the event originated.
Override the context property of UniversalEventProperties with a page-specific context.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Page context for events that occur within a web 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.
OptionaluserAgent?: stringUser agent string of the client, if available.
Unique identifier for this message.
Optionalname?: stringOptional name for the page.
Timestamp when the event originally occurred.
Page-level properties such as URL, path, and referrer.
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.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this event is a page view.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Channel from which the event originated.
Override the context property of UniversalEventProperties with a screen-specific context.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Screen context for events that occur within a mobile or TV application.
Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
Unique identifier for this message.
Name of the screen being viewed.
Timestamp when the event originally occurred.
Optionalproperties?: Record<string, JSONType>Optional properties describing the screen context.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this event is a screen view.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Channel from which the event originated.
Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
Name of the event being tracked.
Unique identifier for this message.
Timestamp when the event originally occurred.
Additional properties describing the event.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this event is a track event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Channel from which the event originated.
Contentful entry ID or flag key corresponding to the interaction.
Type of tracked optimization target for the interaction event.
'Entry' — A content entry.'Variable' — A Custom Flag or other variable-backed optimization target.Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
OptionalexperienceId?: stringIdentifier of the experience that rendered this entry or flag.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this is an entry or flag view event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Index of the variant associated with this interaction.
OptionalviewDurationMs?: numberMonotonically increasing visible duration for the active view.
OptionalviewId?: stringUUID identifying a single active view session.
Optionalprofile: { id: string; [key: string]: JSONType }Identifier of the profile.
ProtectedsendChannel from which the event originated.
Contentful entry ID or flag key corresponding to the interaction.
Type of tracked optimization target for the interaction event.
'Entry' — A content entry.'Variable' — A Custom Flag or other variable-backed optimization target.Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
OptionalexperienceId?: stringIdentifier of the experience that rendered this entry or flag.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this is an entry or flag view event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Index of the variant associated with this interaction.
OptionalviewDurationMs?: numberMonotonically increasing visible duration for the active view.
OptionalviewId?: stringUUID identifying a single active view session.
Channel from which the event originated.
Contentful entry ID or flag key corresponding to the interaction.
Type of tracked optimization target for the interaction event.
'Entry' — A content entry.'Variable' — A Custom Flag or other variable-backed optimization target.Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
OptionalexperienceId?: stringIdentifier of the experience that rendered this entry or flag.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this is an entry click event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Index of the variant associated with this interaction.
Channel from which the event originated.
Contentful entry ID or flag key corresponding to the interaction.
Type of tracked optimization target for the interaction event.
'Entry' — A content entry.'Variable' — A Custom Flag or other variable-backed optimization target.Context object carrying environment and client metadata.
Optionalapp?: { name: string; version: string }Application-level metadata.
Name of the application.
Version of the application.
Campaign attribution metadata.
Optionalcontent?: stringCampaign content (e.g., utm_content).
Optionalmedium?: stringCampaign medium (e.g., utm_medium).
Optionalname?: stringName of the campaign (e.g., utm_campaign).
Optionalsource?: stringCampaign source (e.g., utm_source).
Optionalterm?: stringCampaign term (e.g., utm_term).
GDPR-related consent information.
Indicates whether the user has given consent.
Analytics library metadata.
Name of the SDK/library (e.g., "@contentful/optimization-web").
Version of the analytics library.
Locale identifier of the event (e.g., "en-US").
Optionallocation?: {Optional geo-location information associated with the event.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Optionalpage?: {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.
Optionalscreen?: { name: string; [key: string]: JSONType }Name or label for the screen.
OptionaluserAgent?: stringUser agent string of the client, if available.
OptionalexperienceId?: stringIdentifier of the experience that rendered this entry or flag.
Monotonically increasing hover duration for the active hover.
UUID identifying a single active hover session.
Unique identifier for this message.
Timestamp when the event originally occurred.
Timestamp when the event payload was sent.
Timestamp when the event was recorded or processed.
Discriminator indicating that this is an entry hover event.
OptionaluserId?: stringIdentifier of the authenticated user, if known.
Index of the variant associated with this interaction.
Optionalprofile: { id: string; [key: string]: JSONType }Identifier of the profile.
Convenience wrapper for sending a custom track event through the Experience path.
Track builder arguments.
The evaluated OptimizationData for this event.
Track an entry click through Insights.
Entry click builder arguments.
A promise that resolves when processing completes.
Track a feature flag view through Insights.
Flag view builder arguments used to build the flag view event.
A promise that resolves when processing completes.
Track an entry hover through Insights.
Entry hover builder arguments.
A promise that resolves when processing completes.
Track an entry view through Insights and, when sticky, Experience.
Entry view builder arguments. When payload.sticky is
true, the event will also be sent through Experience as a sticky
entry view.
A promise that resolves when all delegated calls complete.
Core runtime for stateless environments.
Built on top of
CoreBase.