• Initialize the Personalize SDK

    init() should be called and awaited before setting attributes, triggering events or fetching variants. The SDK will make a call to fetch the manifest during initialization. If the SDK is running in a browser environment and a manifest cookie is already present (for e.g. the cookie is added by addStateToResponse() method), then the SDK will not make a call and fetch the manifest directly from the cookie.

    Parameters

    • projectUid: string

      Project UID, find this in the Personalize project settings

    • Optionaloptions: InitOptions

      Initialization options

    Returns Promise<void>

    await Personalize.init(projecUid, { request });