Contentful Personalization & Analytics
    Preparing search index...

    Stateful personalization product that manages consent, profile, flags, and selected variants while emitting Experience events and updating state.

    The class maintains reactive signals and exposes read‑only observables via PersonalizationStateful.states. Events are validated via schema parsers and run through interceptors before being submitted. Resulting state is merged back into signals.

    Hierarchy

    • PersonalizationBase
      • PersonalizationStateful

    Implements

    • ConsentGuard
    Index

    Constructors

    Properties

    allowedEventTypes?: string[]

    Allow‑list of event type keys permitted when consent is not present.

    api: default

    Optimization API client used to send events to the Experience and Insights APIs.

    builder: EventBuilder

    Event builder used to construct strongly‑typed events.

    duplicationDetector: ValuePresence

    Deduplication helper used to track previously seen values within optional scopes

    flagsResolver: {
        resolve(
            changes?: {
                key: string;
                meta: { experienceId: string; variantIndex: number };
                type: "Variable";
                value: null | string | number | boolean | Record<string, JSONType>;
            }[],
        ): Flags;
    } = FlagsResolver

    Static resolver for evaluating personalized custom flags.

    Type declaration

    • resolve: function
      • Build a flattened map of flag keys to values from a change list.

        Parameters

        • Optionalchanges: {
              key: string;
              meta: { experienceId: string; variantIndex: number };
              type: "Variable";
              value: null | string | number | boolean | Record<string, JSONType>;
          }[]

          The change list returned by the optimization service.

          • key: string

            Key identifying the subject of the change.

          • meta: { experienceId: string; variantIndex: number }

            Metadata describing the originating experience and variant index.

            • experienceId: string

              Identifier of the personalization or experiment experience.

            • variantIndex: number

              Index of the variant within the experience configuration.

              Typically corresponds to the array index in the experience's distribution.

          • type: "Variable"

            Discriminator for a variable change.

          • value: null | string | number | boolean | Record<string, JSONType>

            New value for the variable identified by ChangeBase.key.

        Returns Flags

        A map of flag keys to their resolved values.

        const flags = FlagsResolver.resolve(data.changes)
        if (flags['theme'] === 'dark') enableDarkMode()

        // Handles wrapped values produced by the API

        const flags = FlagsResolver.resolve([
        { type: 'Variable', key: 'price', value: { value: { amount: 10, currency: 'USD' } } }
        ])
        console.log(flags.price.amount) // 10
    getAnonymousId: () => undefined | string

    Function that provides an anonymous ID when available.

    interceptors: LifecycleInterceptors

    Interceptors that can mutate/augment outgoing events or optimization state.

    mergeTagValueResolver: {
        getValueFromProfile(
            id: string,
            profile?: {
                audiences: string[];
                id: string;
                location: {
                    city?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                random: number;
                session: {
                    activeSessionLength: number;
                    averageSessionLength: number;
                    count: number;
                    id: string;
                    isReturningVisitor: boolean;
                    landingPage: {
                        path: string;
                        query: Record<string, string>;
                        referrer: string;
                        search: string;
                        title?: string;
                        url: string;
                        [key: string]: JSONType;
                    };
                };
                stableId: string;
                traits: Record<string, JSONType>;
            },
        ): undefined
        | string;
        isMergeTagEntry(
            embeddedEntryNodeTarget: unknown,
        ): embeddedEntryNodeTarget is {
            fields: {
                nt_fallback?: string;
                nt_mergetag_id: string;
                nt_name: string;
            };
            metadata: {
                tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                [key: string]: JSONType;
            };
            sys: {
                contentType: {
                    sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                };
                createdAt: any;
                environment: {
                    sys: { id: string; linkType: "Environment"; type: "Link" };
                };
                id: string;
                locale?: string;
                publishedVersion: number;
                revision: number;
                space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                type: "Entry";
                updatedAt: any;
            };
        };
        normalizeSelectors(id: string): string[];
        resolve(
            mergeTagEntry:
                | undefined
                | {
                    fields: {
                        nt_fallback?: string;
                        nt_mergetag_id: string;
                        nt_name: string;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                },
            profile?: {
                audiences: string[];
                id: string;
                location: {
                    city?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                random: number;
                session: {
                    activeSessionLength: number;
                    averageSessionLength: number;
                    count: number;
                    id: string;
                    isReturningVisitor: boolean;
                    landingPage: {
                        path: string;
                        query: Record<string, string>;
                        referrer: string;
                        search: string;
                        title?: string;
                        url: string;
                        [key: string]: JSONType;
                    };
                };
                stableId: string;
                traits: Record<string, JSONType>;
            },
        ): undefined
        | string;
    } = MergeTagValueResolver

    Static resolver that returns values sourced from a user profile based on a Contentful Merge Tag entry.

    Type declaration

    • getValueFromProfile: function
      • Look up a merge-tag value from a profile using normalized selectors.

        Parameters

        • id: string

          Merge-tag identifier.

        • Optionalprofile: {
              audiences: string[];
              id: string;
              location: {
                  city?: string;
                  continent?: string;
                  coordinates?: { latitude: number; longitude: number };
                  country?: string;
                  countryCode?: string;
                  postalCode?: string;
                  region?: string;
                  regionCode?: string;
                  timezone?: string;
              };
              random: number;
              session: {
                  activeSessionLength: number;
                  averageSessionLength: number;
                  count: number;
                  id: string;
                  isReturningVisitor: boolean;
                  landingPage: {
                      path: string;
                      query: Record<string, string>;
                      referrer: string;
                      search: string;
                      title?: string;
                      url: string;
                      [key: string]: JSONType;
                  };
              };
              stableId: string;
              traits: Record<string, JSONType>;
          }

          Profile from which to resolve the value.

          • audiences: string[]

            List of audience identifiers that this profile currently belongs to.

          • id: string

            Primary identifier of the profile.

          • location: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            }

            Geo-location information associated with the profile.

            GeoLocation

            • Optionalcity?: string

              City name associated with the location.

            • Optionalcontinent?: string

              Continent name associated with the location.

            • Optionalcoordinates?: { latitude: number; longitude: number }

              Geographical coordinates for the location.

              • latitude: number

                Latitude component of the coordinates.

              • longitude: number

                Longitude component of the coordinates.

            • Optionalcountry?: string

              Country name associated with the location.

            • OptionalcountryCode?: string

              Country code associated with the location.

              Validated to exactly COUNTRY_CODE_LENGTH characters, typically an ISO 3166-1 alpha-2 code.

            • OptionalpostalCode?: string

              Postal or ZIP code associated with the location.

            • Optionalregion?: string

              Region or state name associated with the location.

            • OptionalregionCode?: string

              Region or state code associated with the location.

            • Optionaltimezone?: string

              Time zone identifier associated with the location.

              Typically an IANA time zone string (e.g., "Europe/Berlin").

          • random: number

            Random value associated with the profile.

            Often used for deterministic bucketing (e.g., in experiments).

          • session: {
                activeSessionLength: number;
                averageSessionLength: number;
                count: number;
                id: string;
                isReturningVisitor: boolean;
                landingPage: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
            }

            Aggregated session statistics for the profile.

            SessionStatistics

            • activeSessionLength: number

              Duration of the active session.

            • averageSessionLength: number

              Average session duration across all sessions represented by this record.

              The unit should match SessionStatistics.activeSessionLength.

            • count: number

              Number of sessions associated with this profile or identifier.

              Often used in combination with SessionStatistics.averageSessionLength.

            • id: string

              Unique identifier for this session statistics record.

            • isReturningVisitor: boolean

              Indicates whether the visitor has been seen before.

              true typically means the visitor has at least one prior session.

            • landingPage: {
                  path: string;
                  query: Record<string, string>;
                  referrer: string;
                  search: string;
                  title?: string;
                  url: string;
                  [key: string]: JSONType;
              }

              Landing page for the session.

              Represents the first page the user visited in this session.

              Page

              • path: string

                Path component of the page URL (e.g., /products/123).

              • query: Record<string, string>

                Parsed query parameters for the page.

              • referrer: string

                Referrer URL that led to the current page.

              • search: string

                Raw search string including the leading ? (e.g., "?q=test").

              • Optionaltitle?: string

                Title of the page as seen by the user.

              • url: string

                Full URL of the page.

          • stableId: string

            Stable, long-lived identifier of the profile.

            Intended to remain constant across sessions and devices when possible. Usually equal to id.

          • traits: Record<string, JSONType>

            Traits describing the profile (user-level attributes).

            Traits

        Returns undefined | string

        A stringified primitive if found; otherwise undefined.

        const value = MergeTagValueResolver.getValueFromProfile('user_email', profile)
        if (value) sendEmailTo(value)

        Only string/number/boolean primitives are returned; objects/arrays are ignored.

    • isMergeTagEntry: function
      • Type guard to ensure the input is a MergeTagEntry.

        Parameters

        • embeddedEntryNodeTarget: unknown

          Unknown value to validate.

        Returns embeddedEntryNodeTarget is {
            fields: {
                nt_fallback?: string;
                nt_mergetag_id: string;
                nt_name: string;
            };
            metadata: {
                tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                [key: string]: JSONType;
            };
            sys: {
                contentType: {
                    sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                };
                createdAt: any;
                environment: {
                    sys: { id: string; linkType: "Environment"; type: "Link" };
                };
                id: string;
                locale?: string;
                publishedVersion: number;
                revision: number;
                space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                type: "Entry";
                updatedAt: any;
            };
        }

        true if the input is a valid merge-tag entry.

        if (MergeTagValueResolver.isMergeTagEntry(node)) {
        // safe to read fields
        }
    • normalizeSelectors: function
      • Generate a list of candidate selectors for a merge-tag ID.

        Parameters

        • id: string

          Merge-tag identifier (segments separated by _).

        Returns string[]

        Array of dot-path selectors to try against a profile.

        // "profile_name_first" -> [
        // 'profile',
        // 'profile.name',
        // 'profile.name.first'
        // ]
        const selectors = MergeTagValueResolver.normalizeSelectors('profile_name_first')
    • resolve: function
      • Resolve the display value for a merge-tag entry using the provided profile, falling back to the entry's configured nt_fallback when necessary.

        Parameters

        • mergeTagEntry:
              | undefined
              | {
                  fields: {
                      nt_fallback?: string;
                      nt_mergetag_id: string;
                      nt_name: string;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              }

          The merge-tag entry to resolve.

          • undefined
          • {
                fields: {
                    nt_fallback?: string;
                    nt_mergetag_id: string;
                    nt_name: string;
                };
                metadata: {
                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                    [key: string]: JSONType;
                };
                sys: {
                    contentType: {
                        sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                    };
                    createdAt: any;
                    environment: {
                        sys: { id: string; linkType: "Environment"; type: "Link" };
                    };
                    id: string;
                    locale?: string;
                    publishedVersion: number;
                    revision: number;
                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                    type: "Entry";
                    updatedAt: any;
                };
            }
            • fields: { nt_fallback?: string; nt_mergetag_id: string; nt_name: string }
              • Optionalnt_fallback?: string

                Fallback value to use when the merge tag cannot be resolved.

              • nt_mergetag_id: string

                Internal identifier of the merge tag.

              • nt_name: string

                Human-readable name of the merge tag.

            • metadata: {
                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                  [key: string]: JSONType;
              }

              Contentful metadata, including tags.

            • sys: {
                  contentType: {
                      sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                  };
                  createdAt: any;
                  environment: { sys: { id: string; linkType: "Environment"; type: "Link" } };
                  id: string;
                  locale?: string;
                  publishedVersion: number;
                  revision: number;
                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                  type: "Entry";
                  updatedAt: any;
              }

              System fields extended to constrain the content type to nt_mergetag.

        • Optionalprofile: {
              audiences: string[];
              id: string;
              location: {
                  city?: string;
                  continent?: string;
                  coordinates?: { latitude: number; longitude: number };
                  country?: string;
                  countryCode?: string;
                  postalCode?: string;
                  region?: string;
                  regionCode?: string;
                  timezone?: string;
              };
              random: number;
              session: {
                  activeSessionLength: number;
                  averageSessionLength: number;
                  count: number;
                  id: string;
                  isReturningVisitor: boolean;
                  landingPage: {
                      path: string;
                      query: Record<string, string>;
                      referrer: string;
                      search: string;
                      title?: string;
                      url: string;
                      [key: string]: JSONType;
                  };
              };
              stableId: string;
              traits: Record<string, JSONType>;
          }

          Optional profile used for lookup.

          • audiences: string[]

            List of audience identifiers that this profile currently belongs to.

          • id: string

            Primary identifier of the profile.

          • location: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            }

            Geo-location information associated with the profile.

            GeoLocation

            • Optionalcity?: string

              City name associated with the location.

            • Optionalcontinent?: string

              Continent name associated with the location.

            • Optionalcoordinates?: { latitude: number; longitude: number }

              Geographical coordinates for the location.

              • latitude: number

                Latitude component of the coordinates.

              • longitude: number

                Longitude component of the coordinates.

            • Optionalcountry?: string

              Country name associated with the location.

            • OptionalcountryCode?: string

              Country code associated with the location.

              Validated to exactly COUNTRY_CODE_LENGTH characters, typically an ISO 3166-1 alpha-2 code.

            • OptionalpostalCode?: string

              Postal or ZIP code associated with the location.

            • Optionalregion?: string

              Region or state name associated with the location.

            • OptionalregionCode?: string

              Region or state code associated with the location.

            • Optionaltimezone?: string

              Time zone identifier associated with the location.

              Typically an IANA time zone string (e.g., "Europe/Berlin").

          • random: number

            Random value associated with the profile.

            Often used for deterministic bucketing (e.g., in experiments).

          • session: {
                activeSessionLength: number;
                averageSessionLength: number;
                count: number;
                id: string;
                isReturningVisitor: boolean;
                landingPage: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
            }

            Aggregated session statistics for the profile.

            SessionStatistics

            • activeSessionLength: number

              Duration of the active session.

            • averageSessionLength: number

              Average session duration across all sessions represented by this record.

              The unit should match SessionStatistics.activeSessionLength.

            • count: number

              Number of sessions associated with this profile or identifier.

              Often used in combination with SessionStatistics.averageSessionLength.

            • id: string

              Unique identifier for this session statistics record.

            • isReturningVisitor: boolean

              Indicates whether the visitor has been seen before.

              true typically means the visitor has at least one prior session.

            • landingPage: {
                  path: string;
                  query: Record<string, string>;
                  referrer: string;
                  search: string;
                  title?: string;
                  url: string;
                  [key: string]: JSONType;
              }

              Landing page for the session.

              Represents the first page the user visited in this session.

              Page

              • path: string

                Path component of the page URL (e.g., /products/123).

              • query: Record<string, string>

                Parsed query parameters for the page.

              • referrer: string

                Referrer URL that led to the current page.

              • search: string

                Raw search string including the leading ? (e.g., "?q=test").

              • Optionaltitle?: string

                Title of the page as seen by the user.

              • url: string

                Full URL of the page.

          • stableId: string

            Stable, long-lived identifier of the profile.

            Intended to remain constant across sessions and devices when possible. Usually equal to id.

          • traits: Record<string, JSONType>

            Traits describing the profile (user-level attributes).

            Traits

        Returns undefined | string

        The resolved string, or undefined if the entry is invalid and no fallback is available.

        const text = MergeTagValueResolver.resolve(entry, profile)
        render(text ?? 'Guest')
    personalizedEntryResolver: {
        getPersonalizationEntry(
            params: {
                personalizedEntry: {
                    fields: {
                        nt_experiences: (
                            | { sys: { id: string; linkType: string; type: "Link" } }
                            | {
                                fields: {
                                    nt_audience?:
                                        | null
                                        | {
                                            fields: {
                                                nt_audience_id: ...;
                                                nt_description?: ...;
                                                nt_name?: ...;
                                                [key: ...]: ...;
                                            };
                                            metadata: { tags: ...; [key: ...]: ... };
                                            sys: {
                                                contentType: ...;
                                                createdAt: ...;
                                                environment: ...;
                                                id: ...;
                                                locale?: ...;
                                                publishedVersion: ...;
                                                revision: ...;
                                                space: ...;
                                                type: ...;
                                                updatedAt: ...;
                                            };
                                        };
                                    nt_config: | null
                                    | {
                                        components?: (...)
                                        | (...);
                                        distribution?: (...) | (...);
                                        sticky?: (...) | (...) | (...);
                                        traffic?: (...) | (...);
                                    };
                                    nt_description?: null
                                    | string;
                                    nt_experience_id: string;
                                    nt_name: string;
                                    nt_type: "nt_experiment" | "nt_personalization";
                                    nt_variants?: Entry[];
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            }
                        )[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedPersonalizations: {
                    experienceId: string;
                    sticky?: boolean;
                    variantIndex: number;
                    variants: Record<string, string>;
                }[];
            },
            skipValidation?: boolean,
        ):
            | undefined
            | {
                fields: {
                    nt_audience?: | null
                    | {
                        fields: {
                            nt_audience_id: string;
                            nt_description?: string;
                            nt_name?: string;
                            [key: string]: JSONType;
                        };
                        metadata: {
                            tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                            [key: string]: JSONType;
                        };
                        sys: {
                            contentType: {
                                sys: { id: string; linkType: "ContentType"; type: "Link" };
                            };
                            createdAt: any;
                            environment: {
                                sys: { id: string; linkType: "Environment"; type: "Link" };
                            };
                            id: string;
                            locale?: string;
                            publishedVersion: number;
                            revision: number;
                            space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                            type: "Entry";
                            updatedAt: any;
                        };
                    };
                    nt_config: | null
                    | {
                        components?: (
                            | {
                                baseline: { hidden: ...; id: ... };
                                type?: (...) | (...);
                                variants: (...)[];
                            }
                            | {
                                baseline: { value: ... };
                                key: string;
                                type: "InlineVariable";
                                valueType: (...) | (...) | (...) | (...);
                                variants: (...)[];
                            }
                        )[];
                        distribution?: number[];
                        sticky?: boolean;
                        traffic?: number;
                    };
                    nt_description?: null
                    | string;
                    nt_experience_id: string;
                    nt_name: string;
                    nt_type: "nt_experiment" | "nt_personalization";
                    nt_variants?: Entry[];
                    [key: string]: JSONType;
                };
                metadata: {
                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                    [key: string]: JSONType;
                };
                sys: {
                    contentType: {
                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                    };
                    createdAt: any;
                    environment: {
                        sys: { id: string; linkType: "Environment"; type: "Link" };
                    };
                    id: string;
                    locale?: string;
                    publishedVersion: number;
                    revision: number;
                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                    type: "Entry";
                    updatedAt: any;
                };
            };
        getSelectedPersonalization(
            params: {
                personalizationEntry: {
                    fields: {
                        nt_audience?:
                            | null
                            | {
                                fields: {
                                    nt_audience_id: string;
                                    nt_description?: string;
                                    nt_name?: string;
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            };
                        nt_config: | null
                        | {
                            components?: (
                                | {
                                    baseline: { hidden: ...; id: ... };
                                    type?: (...) | (...);
                                    variants: (...)[];
                                }
                                | {
                                    baseline: { value: ... };
                                    key: string;
                                    type: "InlineVariable";
                                    valueType: (...) | (...) | (...) | (...);
                                    variants: (...)[];
                                }
                            )[];
                            distribution?: number[];
                            sticky?: boolean;
                            traffic?: number;
                        };
                        nt_description?: null
                        | string;
                        nt_experience_id: string;
                        nt_name: string;
                        nt_type: "nt_experiment" | "nt_personalization";
                        nt_variants?: Entry[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedPersonalizations: {
                    experienceId: string;
                    sticky?: boolean;
                    variantIndex: number;
                    variants: Record<string, string>;
                }[];
            },
            skipValidation?: boolean,
        ):
            | undefined
            | {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            };
        getSelectedVariant(
            params: {
                personalizationEntry: {
                    fields: {
                        nt_audience?:
                            | null
                            | {
                                fields: {
                                    nt_audience_id: string;
                                    nt_description?: string;
                                    nt_name?: string;
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            };
                        nt_config: | null
                        | {
                            components?: (
                                | {
                                    baseline: { hidden: ...; id: ... };
                                    type?: (...) | (...);
                                    variants: (...)[];
                                }
                                | {
                                    baseline: { value: ... };
                                    key: string;
                                    type: "InlineVariable";
                                    valueType: (...) | (...) | (...) | (...);
                                    variants: (...)[];
                                }
                            )[];
                            distribution?: number[];
                            sticky?: boolean;
                            traffic?: number;
                        };
                        nt_description?: null
                        | string;
                        nt_experience_id: string;
                        nt_name: string;
                        nt_type: "nt_experiment" | "nt_personalization";
                        nt_variants?: Entry[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                personalizedEntry: {
                    fields: {
                        nt_experiences: (
                            | { sys: { id: string; linkType: string; type: "Link" } }
                            | {
                                fields: {
                                    nt_audience?:
                                        | null
                                        | {
                                            fields: {
                                                nt_audience_id: ...;
                                                nt_description?: ...;
                                                nt_name?: ...;
                                                [key: ...]: ...;
                                            };
                                            metadata: { tags: ...; [key: ...]: ... };
                                            sys: {
                                                contentType: ...;
                                                createdAt: ...;
                                                environment: ...;
                                                id: ...;
                                                locale?: ...;
                                                publishedVersion: ...;
                                                revision: ...;
                                                space: ...;
                                                type: ...;
                                                updatedAt: ...;
                                            };
                                        };
                                    nt_config: | null
                                    | {
                                        components?: (...)
                                        | (...);
                                        distribution?: (...) | (...);
                                        sticky?: (...) | (...) | (...);
                                        traffic?: (...) | (...);
                                    };
                                    nt_description?: null
                                    | string;
                                    nt_experience_id: string;
                                    nt_name: string;
                                    nt_type: "nt_experiment" | "nt_personalization";
                                    nt_variants?: Entry[];
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            }
                        )[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedVariantIndex: number;
            },
            skipValidation?: boolean,
        ): undefined | { hidden: boolean; id: string };
        getSelectedVariantEntry<
            S extends EntrySkeletonType,
            M extends ChainModifiers = ChainModifiers,
            L extends string = string,
        >(
            params: {
                personalizationEntry: {
                    fields: {
                        nt_audience?:
                            | null
                            | {
                                fields: {
                                    nt_audience_id: string;
                                    nt_description?: string;
                                    nt_name?: string;
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            };
                        nt_config: | null
                        | {
                            components?: (
                                | {
                                    baseline: { hidden: ...; id: ... };
                                    type?: (...) | (...);
                                    variants: (...)[];
                                }
                                | {
                                    baseline: { value: ... };
                                    key: string;
                                    type: "InlineVariable";
                                    valueType: (...) | (...) | (...) | (...);
                                    variants: (...)[];
                                }
                            )[];
                            distribution?: number[];
                            sticky?: boolean;
                            traffic?: number;
                        };
                        nt_description?: null
                        | string;
                        nt_experience_id: string;
                        nt_name: string;
                        nt_type: "nt_experiment" | "nt_personalization";
                        nt_variants?: Entry[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedVariant: { hidden: boolean; id: string };
            },
            skipValidation?: boolean,
        ): undefined | Entry<S, M, L>;
        resolve<
            S extends EntrySkeletonType,
            M extends ChainModifiers = ChainModifiers,
            L extends string = string,
        >(
            entry: Entry<S, M, L>,
            selectedPersonalizations?: {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            }[],
        ): ResolvedData<S, M, L>;
    } = PersonalizedEntryResolver

    Static resolver for personalized Contentful entries (e.g., entry variants targeted to a profile audience).

    Type declaration

    • getPersonalizationEntry: function
      • Find the personalization entry corresponding to one of the selected experiences.

        Parameters

        • params: {
              personalizedEntry: {
                  fields: {
                      nt_experiences: (
                          | { sys: { id: string; linkType: string; type: "Link" } }
                          | {
                              fields: {
                                  nt_audience?:
                                      | null
                                      | {
                                          fields: {
                                              nt_audience_id: ...;
                                              nt_description?: ...;
                                              nt_name?: ...;
                                              [key: ...]: ...;
                                          };
                                          metadata: { tags: ...; [key: ...]: ... };
                                          sys: {
                                              contentType: ...;
                                              createdAt: ...;
                                              environment: ...;
                                              id: ...;
                                              locale?: ...;
                                              publishedVersion: ...;
                                              revision: ...;
                                              space: ...;
                                              type: ...;
                                              updatedAt: ...;
                                          };
                                      };
                                  nt_config: | null
                                  | {
                                      components?: (...)
                                      | (...);
                                      distribution?: (...) | (...);
                                      sticky?: (...) | (...) | (...);
                                      traffic?: (...) | (...);
                                  };
                                  nt_description?: null
                                  | string;
                                  nt_experience_id: string;
                                  nt_name: string;
                                  nt_type: "nt_experiment" | "nt_personalization";
                                  nt_variants?: Entry[];
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          }
                      )[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedPersonalizations: {
                  experienceId: string;
                  sticky?: boolean;
                  variantIndex: number;
                  variants: Record<string, string>;
              }[];
          }

          Object containing the baseline personalized entry and the selections.

        • skipValidation: boolean = false

          When true, skip type/shape validation for perf.

        Returns
            | undefined
            | {
                fields: {
                    nt_audience?: | null
                    | {
                        fields: {
                            nt_audience_id: string;
                            nt_description?: string;
                            nt_name?: string;
                            [key: string]: JSONType;
                        };
                        metadata: {
                            tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                            [key: string]: JSONType;
                        };
                        sys: {
                            contentType: {
                                sys: { id: string; linkType: "ContentType"; type: "Link" };
                            };
                            createdAt: any;
                            environment: {
                                sys: { id: string; linkType: "Environment"; type: "Link" };
                            };
                            id: string;
                            locale?: string;
                            publishedVersion: number;
                            revision: number;
                            space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                            type: "Entry";
                            updatedAt: any;
                        };
                    };
                    nt_config: | null
                    | {
                        components?: (
                            | {
                                baseline: { hidden: ...; id: ... };
                                type?: (...) | (...);
                                variants: (...)[];
                            }
                            | {
                                baseline: { value: ... };
                                key: string;
                                type: "InlineVariable";
                                valueType: (...) | (...) | (...) | (...);
                                variants: (...)[];
                            }
                        )[];
                        distribution?: number[];
                        sticky?: boolean;
                        traffic?: number;
                    };
                    nt_description?: null
                    | string;
                    nt_experience_id: string;
                    nt_name: string;
                    nt_type: "nt_experiment" | "nt_personalization";
                    nt_variants?: Entry[];
                    [key: string]: JSONType;
                };
                metadata: {
                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                    [key: string]: JSONType;
                };
                sys: {
                    contentType: {
                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                    };
                    createdAt: any;
                    environment: {
                        sys: { id: string; linkType: "Environment"; type: "Link" };
                    };
                    id: string;
                    locale?: string;
                    publishedVersion: number;
                    revision: number;
                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                    type: "Entry";
                    updatedAt: any;
                };
            }

        The matching PersonalizationEntry, or undefined if not found/invalid.

        • undefined
        • {
              fields: {
                  nt_audience?:
                      | null
                      | {
                          fields: {
                              nt_audience_id: string;
                              nt_description?: string;
                              nt_name?: string;
                              [key: string]: JSONType;
                          };
                          metadata: {
                              tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                              [key: string]: JSONType;
                          };
                          sys: {
                              contentType: {
                                  sys: { id: string; linkType: "ContentType"; type: "Link" };
                              };
                              createdAt: any;
                              environment: {
                                  sys: { id: string; linkType: "Environment"; type: "Link" };
                              };
                              id: string;
                              locale?: string;
                              publishedVersion: number;
                              revision: number;
                              space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                              type: "Entry";
                              updatedAt: any;
                          };
                      };
                  nt_config: | null
                  | {
                      components?: (
                          | {
                              baseline: { hidden: ...; id: ... };
                              type?: (...) | (...);
                              variants: (...)[];
                          }
                          | {
                              baseline: { value: ... };
                              key: string;
                              type: "InlineVariable";
                              valueType: (...) | (...) | (...) | (...);
                              variants: (...)[];
                          }
                      )[];
                      distribution?: number[];
                      sticky?: boolean;
                      traffic?: number;
                  };
                  nt_description?: null
                  | string;
                  nt_experience_id: string;
                  nt_name: string;
                  nt_type: "nt_experiment" | "nt_personalization";
                  nt_variants?: Entry[];
                  [key: string]: JSONType;
              };
              metadata: {
                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                  [key: string]: JSONType;
              };
              sys: {
                  contentType: {
                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                  };
                  createdAt: any;
                  environment: {
                      sys: { id: string; linkType: "Environment"; type: "Link" };
                  };
                  id: string;
                  locale?: string;
                  publishedVersion: number;
                  revision: number;
                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                  type: "Entry";
                  updatedAt: any;
              };
          }
          • fields: {
                nt_audience?:
                    | null
                    | {
                        fields: {
                            nt_audience_id: string;
                            nt_description?: string;
                            nt_name?: string;
                            [key: string]: JSONType;
                        };
                        metadata: {
                            tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                            [key: string]: JSONType;
                        };
                        sys: {
                            contentType: {
                                sys: { id: string; linkType: "ContentType"; type: "Link" };
                            };
                            createdAt: any;
                            environment: {
                                sys: { id: string; linkType: "Environment"; type: "Link" };
                            };
                            id: string;
                            locale?: string;
                            publishedVersion: number;
                            revision: number;
                            space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                            type: "Entry";
                            updatedAt: any;
                        };
                    };
                nt_config: | null
                | {
                    components?: (
                        | {
                            baseline: { hidden: ...; id: ... };
                            type?: (...) | (...);
                            variants: (...)[];
                        }
                        | {
                            baseline: { value: ... };
                            key: string;
                            type: "InlineVariable";
                            valueType: (...) | (...) | (...) | (...);
                            variants: (...)[];
                        }
                    )[];
                    distribution?: number[];
                    sticky?: boolean;
                    traffic?: number;
                };
                nt_description?: null
                | string;
                nt_experience_id: string;
                nt_name: string;
                nt_type: "nt_experiment" | "nt_personalization";
                nt_variants?: Entry[];
                [key: string]: JSONType;
            }
            • Optionalnt_audience?:
                  | null
                  | {
                      fields: {
                          nt_audience_id: string;
                          nt_description?: string;
                          nt_name?: string;
                          [key: string]: JSONType;
                      };
                      metadata: {
                          tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                          [key: string]: JSONType;
                      };
                      sys: {
                          contentType: {
                              sys: { id: string; linkType: "ContentType"; type: "Link" };
                          };
                          createdAt: any;
                          environment: {
                              sys: { id: string; linkType: "Environment"; type: "Link" };
                          };
                          id: string;
                          locale?: string;
                          publishedVersion: number;
                          revision: number;
                          space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                          type: "Entry";
                          updatedAt: any;
                      };
                  }

              The audience of the personalization (Audience).

              Optional and nullable; when omitted or null, the personalization may apply to all users.

            • nt_config:
                  | null
                  | {
                      components?: (
                          | {
                              baseline: { hidden: ...; id: ... };
                              type?: (...) | (...);
                              variants: (...)[];
                          }
                          | {
                              baseline: { value: ... };
                              key: string;
                              type: "InlineVariable";
                              valueType: (...) | (...) | (...) | (...);
                              variants: (...)[];
                          }
                      )[];
                      distribution?: number[];
                      sticky?: boolean;
                      traffic?: number;
                  }

              The configuration of a PersonalizationEntry (JSON).

              Accepts null or an explicit PersonalizationConfig and converts falsy/undefined values into a default configuration.

            • Optionalnt_description?: null | string

              The description of the personalization (Short Text).

              Optional, may be null if no description is provided.

            • nt_experience_id: string

              The personalization/experience ID related to this personalization entry.

            • nt_name: string

              The name of the personalization (Short Text).

            • nt_type: "nt_experiment" | "nt_personalization"

              The type of the personalization (nt_experiment | nt_personalization).

            • Optionalnt_variants?: Entry[]

              All used variants of the personalization (Contentful references to other Content Types).

              Modeled as an array of untyped Contentful entries and defaults to an empty array when omitted.

          • metadata: {
                tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                [key: string]: JSONType;
            }

            Contentful metadata, including tags.

          • sys: {
                contentType: {
                    sys: { id: string; linkType: "ContentType"; type: "Link" };
                };
                createdAt: any;
                environment: { sys: { id: string; linkType: "Environment"; type: "Link" } };
                id: string;
                locale?: string;
                publishedVersion: number;
                revision: number;
                space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                type: "Entry";
                updatedAt: any;
            }

            System-managed properties describing the entry.

        const personalizationEntry = PersonalizedEntryResolver.getPersonalizationEntry({
        personalizedEntry: entry,
        selectedPersonalizations
        })

        A personalization entry is a personalization configuration object supplied in a PersonalizedEntry.nt_experiences array. A personalized entry may relate to multiple personalizations.

    • getSelectedPersonalization: function
      • Look up the selection metadata for a specific personalization entry.

        Parameters

        • params: {
              personalizationEntry: {
                  fields: {
                      nt_audience?:
                          | null
                          | {
                              fields: {
                                  nt_audience_id: string;
                                  nt_description?: string;
                                  nt_name?: string;
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          };
                      nt_config: | null
                      | {
                          components?: (
                              | {
                                  baseline: { hidden: ...; id: ... };
                                  type?: (...) | (...);
                                  variants: (...)[];
                              }
                              | {
                                  baseline: { value: ... };
                                  key: string;
                                  type: "InlineVariable";
                                  valueType: (...) | (...) | (...) | (...);
                                  variants: (...)[];
                              }
                          )[];
                          distribution?: number[];
                          sticky?: boolean;
                          traffic?: number;
                      };
                      nt_description?: null
                      | string;
                      nt_experience_id: string;
                      nt_name: string;
                      nt_type: "nt_experiment" | "nt_personalization";
                      nt_variants?: Entry[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedPersonalizations: {
                  experienceId: string;
                  sticky?: boolean;
                  variantIndex: number;
                  variants: Record<string, string>;
              }[];
          }

          Object with the target personalization entry and selections.

        • skipValidation: boolean = false

          When true, skip type checks.

        Returns
            | undefined
            | {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            }

        The matching SelectedPersonalization, if present.

        • undefined
        • {
              experienceId: string;
              sticky?: boolean;
              variantIndex: number;
              variants: Record<string, string>;
          }
          • experienceId: string

            Identifier of the personalization or experiment experience.

          • Optionalsticky?: boolean

            Indicates whether this personalization selection is sticky for the user.

            false
            

            Sticky selections should be reused on subsequent requests for the same user, rather than re-allocating a new variant.

          • variantIndex: number

            Index of the selected variant within the experience configuration.

            Typically corresponds to the index of the selected PersonalizationConfig entry.

          • variants: Record<string, string>

            Mapping of baseline entry IDs to their selected variant entry IDs.

            The keys are component identifiers and the values are the identifiers of the selected variant for that component.

        const selectedPersonalization = PersonalizedEntryResolver.getSelectedPersonalization({
        personalizationEntry,
        selectedPersonalizations
        })

        Selected personalizations are supplied by the Experience API in the experiences response data property.

    • getSelectedVariant: function
      • Get the replacement variant config for the given selection index.

        Parameters

        • params: {
              personalizationEntry: {
                  fields: {
                      nt_audience?:
                          | null
                          | {
                              fields: {
                                  nt_audience_id: string;
                                  nt_description?: string;
                                  nt_name?: string;
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          };
                      nt_config: | null
                      | {
                          components?: (
                              | {
                                  baseline: { hidden: ...; id: ... };
                                  type?: (...) | (...);
                                  variants: (...)[];
                              }
                              | {
                                  baseline: { value: ... };
                                  key: string;
                                  type: "InlineVariable";
                                  valueType: (...) | (...) | (...) | (...);
                                  variants: (...)[];
                              }
                          )[];
                          distribution?: number[];
                          sticky?: boolean;
                          traffic?: number;
                      };
                      nt_description?: null
                      | string;
                      nt_experience_id: string;
                      nt_name: string;
                      nt_type: "nt_experiment" | "nt_personalization";
                      nt_variants?: Entry[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              personalizedEntry: {
                  fields: {
                      nt_experiences: (
                          | { sys: { id: string; linkType: string; type: "Link" } }
                          | {
                              fields: {
                                  nt_audience?:
                                      | null
                                      | {
                                          fields: {
                                              nt_audience_id: ...;
                                              nt_description?: ...;
                                              nt_name?: ...;
                                              [key: ...]: ...;
                                          };
                                          metadata: { tags: ...; [key: ...]: ... };
                                          sys: {
                                              contentType: ...;
                                              createdAt: ...;
                                              environment: ...;
                                              id: ...;
                                              locale?: ...;
                                              publishedVersion: ...;
                                              revision: ...;
                                              space: ...;
                                              type: ...;
                                              updatedAt: ...;
                                          };
                                      };
                                  nt_config: | null
                                  | {
                                      components?: (...)
                                      | (...);
                                      distribution?: (...) | (...);
                                      sticky?: (...) | (...) | (...);
                                      traffic?: (...) | (...);
                                  };
                                  nt_description?: null
                                  | string;
                                  nt_experience_id: string;
                                  nt_name: string;
                                  nt_type: "nt_experiment" | "nt_personalization";
                                  nt_variants?: Entry[];
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          }
                      )[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedVariantIndex: number;
          }

          Baseline entry, personalization entry, and 1‑based variant index.

        • skipValidation: boolean = false

          When true, skip type checks.

        Returns undefined | { hidden: boolean; id: string }

        The EntryReplacementVariant for the component, if any.

        • undefined
        • { hidden: boolean; id: string }
          • hidden: boolean

            Indicates whether this variant is hidden from allocation/traffic.

            false
            
          • id: string

            Unique identifier for the variant.

        const selectedVariant = PersonalizedEntryResolver.getSelectedVariant({
        personalizedEntry: entry,
        personalizationEntry,
        selectedVariantIndex: 2 // second variant (1‑based)
        })

        Entry replacement variants are variant configurations specified in a personalization configuration component's variants array supplied by the personalized entry via its nt_config field.

    • getSelectedVariantEntry: function
      • Resolve the concrete Contentful entry that corresponds to a selected variant.

        Type Parameters

        • S extends EntrySkeletonType

          Entry skeleton type.

        • M extends ChainModifiers = ChainModifiers

          Chain modifiers.

        • L extends string = string

          Locale code.

        Parameters

        • params: {
              personalizationEntry: {
                  fields: {
                      nt_audience?:
                          | null
                          | {
                              fields: {
                                  nt_audience_id: string;
                                  nt_description?: string;
                                  nt_name?: string;
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          };
                      nt_config: | null
                      | {
                          components?: (
                              | {
                                  baseline: { hidden: ...; id: ... };
                                  type?: (...) | (...);
                                  variants: (...)[];
                              }
                              | {
                                  baseline: { value: ... };
                                  key: string;
                                  type: "InlineVariable";
                                  valueType: (...) | (...) | (...) | (...);
                                  variants: (...)[];
                              }
                          )[];
                          distribution?: number[];
                          sticky?: boolean;
                          traffic?: number;
                      };
                      nt_description?: null
                      | string;
                      nt_experience_id: string;
                      nt_name: string;
                      nt_type: "nt_experiment" | "nt_personalization";
                      nt_variants?: Entry[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedVariant: { hidden: boolean; id: string };
          }

          Personalization entry and selected variant.

        • skipValidation: boolean = false

          When true, skip type checks.

        Returns undefined | Entry<S, M, L>

        The resolved entry typed as Entry or undefined.

        const selectedVariantEntry = PersonalizedEntryResolver.getSelectedVariantEntry<{ fields: unknown }>({
        personalizationEntry,
        selectedVariant
        })

        A personalized entry will resolve either to the baseline (the entry supplied as personalizedEntry) or the selected variant.

    • resolve: function
      • Resolve the selected entry (baseline or variant) for a personalized entry and optional selected personalizations, returning both the entry and the personalization metadata.

        Type Parameters

        • S extends EntrySkeletonType

          Entry skeleton type.

        • M extends ChainModifiers = ChainModifiers

          Chain modifiers.

        • L extends string = string

          Locale code.

        Parameters

        • entry: Entry<S, M, L>

          The baseline personalized entry.

        • OptionalselectedPersonalizations: {
              experienceId: string;
              sticky?: boolean;
              variantIndex: number;
              variants: Record<string, string>;
          }[]

          Optional selections for the current profile.

          • experienceId: string

            Identifier of the personalization or experiment experience.

          • Optionalsticky?: boolean

            Indicates whether this personalization selection is sticky for the user.

            false
            

            Sticky selections should be reused on subsequent requests for the same user, rather than re-allocating a new variant.

          • variantIndex: number

            Index of the selected variant within the experience configuration.

            Typically corresponds to the index of the selected PersonalizationConfig entry.

          • variants: Record<string, string>

            Mapping of baseline entry IDs to their selected variant entry IDs.

            The keys are component identifiers and the values are the identifiers of the selected variant for that component.

        Returns ResolvedData<S, M, L>

        An object containing the resolved entry and (if chosen) the selection.

        const { entry: personalizedEntry, personalization } = PersonalizedEntryResolver.resolve(entry, selections)
        if (personalization) console.log('Variant index', personalization.variantIndex)

    Used by higher-level personalization flows to materialize entry content prior to event emission.

    states: PersonalizationStates = ...

    Exposed observable state references.

    Methods

    • Get the specified Custom Flag's value (derived from the signal).

      Parameters

      • name: string

        The name or key of the Custom Flag.

      • changes:
            | undefined
            | {
                key: string;
                meta: { experienceId: string; variantIndex: number };
                type: "Variable";
                value: null | string | number | boolean | Record<string, JSONType>;
            }[] = changesSignal.value
        • undefined
        • {
              key: string;
              meta: { experienceId: string; variantIndex: number };
              type: "Variable";
              value: null | string | number | boolean | Record<string, JSONType>;
          }[]
          • key: string

            Key identifying the subject of the change.

          • meta: { experienceId: string; variantIndex: number }

            Metadata describing the originating experience and variant index.

            • experienceId: string

              Identifier of the personalization or experiment experience.

            • variantIndex: number

              Index of the variant within the experience configuration.

              Typically corresponds to the array index in the experience's distribution.

          • type: "Variable"

            Discriminator for a variable change.

          • value: null | string | number | boolean | Record<string, JSONType>

            New value for the variable identified by ChangeBase.key.

      Returns unknown

      The current value of the Custom Flag if found.

    • Resolve a merge tag to a value based on the current (or provided) profile.

      Parameters

      • embeddedEntryNodeTarget: {
            fields: {
                nt_fallback?: string;
                nt_mergetag_id: string;
                nt_name: string;
            };
            metadata: {
                tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                [key: string]: JSONType;
            };
            sys: {
                contentType: {
                    sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
                };
                createdAt: any;
                environment: {
                    sys: { id: string; linkType: "Environment"; type: "Link" };
                };
                id: string;
                locale?: string;
                publishedVersion: number;
                revision: number;
                space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                type: "Entry";
                updatedAt: any;
            };
        }

        The merge‑tag entry node to resolve.

        • fields: { nt_fallback?: string; nt_mergetag_id: string; nt_name: string }
          • Optionalnt_fallback?: string

            Fallback value to use when the merge tag cannot be resolved.

          • nt_mergetag_id: string

            Internal identifier of the merge tag.

          • nt_name: string

            Human-readable name of the merge tag.

        • metadata: {
              tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
              [key: string]: JSONType;
          }

          Contentful metadata, including tags.

        • sys: {
              contentType: {
                  sys: { id: "nt_mergetag"; linkType: "ContentType"; type: "Link" };
              };
              createdAt: any;
              environment: { sys: { id: string; linkType: "Environment"; type: "Link" } };
              id: string;
              locale?: string;
              publishedVersion: number;
              revision: number;
              space: { sys: { id: string; linkType: "Space"; type: "Link" } };
              type: "Entry";
              updatedAt: any;
          }

          System fields extended to constrain the content type to nt_mergetag.

      • profile:
            | undefined
            | {
                audiences: string[];
                id: string;
                location: {
                    city?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                random: number;
                session: {
                    activeSessionLength: number;
                    averageSessionLength: number;
                    count: number;
                    id: string;
                    isReturningVisitor: boolean;
                    landingPage: {
                        path: string;
                        query: Record<string, string>;
                        referrer: string;
                        search: string;
                        title?: string;
                        url: string;
                        [key: string]: JSONType;
                    };
                };
                stableId: string;
                traits: Record<string, JSONType>;
            } = profileSignal.value

        Optional profile; defaults to the current signal value.

        • undefined
        • {
              audiences: string[];
              id: string;
              location: {
                  city?: string;
                  continent?: string;
                  coordinates?: { latitude: number; longitude: number };
                  country?: string;
                  countryCode?: string;
                  postalCode?: string;
                  region?: string;
                  regionCode?: string;
                  timezone?: string;
              };
              random: number;
              session: {
                  activeSessionLength: number;
                  averageSessionLength: number;
                  count: number;
                  id: string;
                  isReturningVisitor: boolean;
                  landingPage: {
                      path: string;
                      query: Record<string, string>;
                      referrer: string;
                      search: string;
                      title?: string;
                      url: string;
                      [key: string]: JSONType;
                  };
              };
              stableId: string;
              traits: Record<string, JSONType>;
          }
          • audiences: string[]

            List of audience identifiers that this profile currently belongs to.

          • id: string

            Primary identifier of the profile.

          • location: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            }

            Geo-location information associated with the profile.

            GeoLocation

            • Optionalcity?: string

              City name associated with the location.

            • Optionalcontinent?: string

              Continent name associated with the location.

            • Optionalcoordinates?: { latitude: number; longitude: number }

              Geographical coordinates for the location.

              • latitude: number

                Latitude component of the coordinates.

              • longitude: number

                Longitude component of the coordinates.

            • Optionalcountry?: string

              Country name associated with the location.

            • OptionalcountryCode?: string

              Country code associated with the location.

              Validated to exactly COUNTRY_CODE_LENGTH characters, typically an ISO 3166-1 alpha-2 code.

            • OptionalpostalCode?: string

              Postal or ZIP code associated with the location.

            • Optionalregion?: string

              Region or state name associated with the location.

            • OptionalregionCode?: string

              Region or state code associated with the location.

            • Optionaltimezone?: string

              Time zone identifier associated with the location.

              Typically an IANA time zone string (e.g., "Europe/Berlin").

          • random: number

            Random value associated with the profile.

            Often used for deterministic bucketing (e.g., in experiments).

          • session: {
                activeSessionLength: number;
                averageSessionLength: number;
                count: number;
                id: string;
                isReturningVisitor: boolean;
                landingPage: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
            }

            Aggregated session statistics for the profile.

            SessionStatistics

            • activeSessionLength: number

              Duration of the active session.

            • averageSessionLength: number

              Average session duration across all sessions represented by this record.

              The unit should match SessionStatistics.activeSessionLength.

            • count: number

              Number of sessions associated with this profile or identifier.

              Often used in combination with SessionStatistics.averageSessionLength.

            • id: string

              Unique identifier for this session statistics record.

            • isReturningVisitor: boolean

              Indicates whether the visitor has been seen before.

              true typically means the visitor has at least one prior session.

            • landingPage: {
                  path: string;
                  query: Record<string, string>;
                  referrer: string;
                  search: string;
                  title?: string;
                  url: string;
                  [key: string]: JSONType;
              }

              Landing page for the session.

              Represents the first page the user visited in this session.

              Page

              • path: string

                Path component of the page URL (e.g., /products/123).

              • query: Record<string, string>

                Parsed query parameters for the page.

              • referrer: string

                Referrer URL that led to the current page.

              • search: string

                Raw search string including the leading ? (e.g., "?q=test").

              • Optionaltitle?: string

                Title of the page as seen by the user.

              • url: string

                Full URL of the page.

          • stableId: string

            Stable, long-lived identifier of the profile.

            Intended to remain constant across sessions and devices when possible. Usually equal to id.

          • traits: Record<string, JSONType>

            Traits describing the profile (user-level attributes).

            Traits

      Returns unknown

      The resolved value (type depends on the tag).

      Merge tags are references to profile data that can be substituted into content.

    • Determine whether the named operation is permitted based on consent and allowed event type configuration.

      Parameters

      • name: string

        Method name; trackComponentView is normalized to 'component' for allow‑list checks.

      Returns boolean

      true if the operation is permitted; otherwise false.

    • Identify the current profile/visitor to associate traits with a profile and update optimization state.

      Parameters

      • payload: {
            campaign?: {
                content?: string;
                medium?: string;
                name?: string;
                source?: string;
                term?: string;
            };
            locale?: string;
            location?: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            page?: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            screen?: { name: string; [key: string]: JSONType };
            traits?: Record<string, JSONType>;
            userAgent?: string;
            userId: string;
        }

        Identify builder payload.

      Returns Promise<undefined | OptimizationData>

      The resulting OptimizationData for the identified user.

    • Guard used to suppress duplicate component view events for the same component based on a duplication key and the component identifier.

      Parameters

      • _name: string

        Operation name (unused).

      • payload: [
            {
                campaign?: {
                    content?: string;
                    medium?: string;
                    name?: string;
                    source?: string;
                    term?: string;
                };
                componentId: string;
                experienceId?: string;
                locale?: string;
                location?: {
                    city?: string;
                    continent?: string;
                    coordinates?: { latitude: number; longitude: number };
                    country?: string;
                    countryCode?: string;
                    postalCode?: string;
                    region?: string;
                    regionCode?: string;
                    timezone?: string;
                };
                page?: {
                    path: string;
                    query: Record<string, string>;
                    referrer: string;
                    search: string;
                    title?: string;
                    url: string;
                    [key: string]: JSONType;
                };
                screen?: { name: string; [key: string]: JSONType };
                sticky?: boolean;
                userAgent?: string;
                variantIndex?: number;
            },
            string,
        ]

        Tuple [builderArgs, duplicationScope].

      Returns boolean

      true if the event is NOT a duplicate and should proceed.

    • Hook invoked when an operation is blocked due to missing consent.

      Parameters

      • name: string

        The blocked operation name.

      • payload: unknown[]

        The original arguments supplied to the operation.

      Returns void

    • Hook invoked when an operation is blocked by the duplication guard.

      Parameters

      • _name: string

        The blocked operation name (unused).

      • payload: unknown[]

        The original arguments supplied to the operation.

      Returns void

    • Record a page view and update optimization state.

      Parameters

      • payload: {
            campaign?: {
                content?: string;
                medium?: string;
                name?: string;
                source?: string;
                term?: string;
            };
            locale?: string;
            location?: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            page?: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            properties?: {
                path?: string;
                query?: Record<string, string>;
                referrer?: string;
                search?: string;
                title?: string;
                url?: string;
                [key: string]: JSONType;
            };
            screen?: { name: string; [key: string]: JSONType };
            userAgent?: string;
        }

        Page view builder payload.

      Returns Promise<undefined | OptimizationData>

      The evaluated OptimizationData for this page view.

    • Resolve a Contentful entry to a personalized variant using the current or provided selections.

      Type Parameters

      • S extends EntrySkeletonType

        Entry skeleton type.

      • M extends ChainModifiers = ChainModifiers

        Chain modifiers.

      • L extends string = string

        Locale code.

      Parameters

      • entry: Entry<S, M, L>

        The entry to personalize.

      • personalizations:
            | undefined
            | {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            }[] = personalizationsSignal.value

        Optional selections; defaults to the current signal value.

        • undefined
        • {
              experienceId: string;
              sticky?: boolean;
              variantIndex: number;
              variants: Record<string, string>;
          }[]
          • experienceId: string

            Identifier of the personalization or experiment experience.

          • Optionalsticky?: boolean

            Indicates whether this personalization selection is sticky for the user.

            false
            

            Sticky selections should be reused on subsequent requests for the same user, rather than re-allocating a new variant.

          • variantIndex: number

            Index of the selected variant within the experience configuration.

            Typically corresponds to the index of the selected PersonalizationConfig entry.

          • variants: Record<string, string>

            Mapping of baseline entry IDs to their selected variant entry IDs.

            The keys are component identifiers and the values are the identifiers of the selected variant for that component.

      Returns ResolvedData<S, M, L>

      The resolved entry data.

    • Record a screen view and update optimization state.

      Parameters

      • payload: {
            campaign?: {
                content?: string;
                medium?: string;
                name?: string;
                source?: string;
                term?: string;
            };
            locale?: string;
            location?: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            name: string;
            page?: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            properties: Record<string, JSONType>;
            screen?: { name: string; [key: string]: JSONType };
            userAgent?: string;
        }

        Screen view builder payload.

      Returns Promise<undefined | OptimizationData>

      The evaluated OptimizationData for this screen view.

    • Record a custom track event and update optimization state.

      Parameters

      • payload: {
            campaign?: {
                content?: string;
                medium?: string;
                name?: string;
                source?: string;
                term?: string;
            };
            event: string;
            locale?: string;
            location?: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            page?: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            properties?: Record<string, JSONType>;
            screen?: { name: string; [key: string]: JSONType };
            userAgent?: string;
        }

        Track builder payload.

      Returns Promise<undefined | OptimizationData>

      The evaluated OptimizationData for this event.

    • Record a "sticky" component view.

      Parameters

      • payload: {
            campaign?: {
                content?: string;
                medium?: string;
                name?: string;
                source?: string;
                term?: string;
            };
            componentId: string;
            experienceId?: string;
            locale?: string;
            location?: {
                city?: string;
                continent?: string;
                coordinates?: { latitude: number; longitude: number };
                country?: string;
                countryCode?: string;
                postalCode?: string;
                region?: string;
                regionCode?: string;
                timezone?: string;
            };
            page?: {
                path: string;
                query: Record<string, string>;
                referrer: string;
                search: string;
                title?: string;
                url: string;
                [key: string]: JSONType;
            };
            screen?: { name: string; [key: string]: JSONType };
            sticky?: boolean;
            userAgent?: string;
            variantIndex?: number;
        }

        "Sticky" component view builder payload.

      • _duplicationScope: string = ''

      Returns Promise<undefined | OptimizationData>

      The evaluated OptimizationData for this component view if the device is online.

      This method is intended to be called only when a component is considered "sticky".