• Check for the active variant in the given experience

    Given an experience short UID, return the activated variant short UID for that experience.

    This method can only be called after initializing the SDK.

    Parameters

    • experienceShortUid: string

      Experience Short UID. Can be obtained from the Personalize Management Console in the experience details page, or from a variant alias.

    Returns string | null

    The short UID of the active variant, if no variant is active, returns null.

    const activeVariant = Personalize.getActiveVariant(experienceShortUid);