UNPKG

@ninetailed/experience.js-plugin-ssr

Version:
25 lines (24 loc) 991 B
import { PROFILE_CHANGE, PROFILE_RESET } from '@ninetailed/experience.js-shared'; import { AnalyticsInstance, type ProfileChangedPayload, type InterestedInProfileChange } from '@ninetailed/experience.js'; import { EventHandler, NinetailedPlugin } from '@ninetailed/experience.js-plugin-analytics'; type NinetailedSsrPluginOptions = { cookie?: { domain?: string; /** * Determines the expiration date of the cookie as the number of days until the cookie expires. */ expires?: number; }; }; export declare class NinetailedSsrPlugin extends NinetailedPlugin implements InterestedInProfileChange { name: string; private cookieDomain?; private cookieExpires?; constructor({ cookie }?: NinetailedSsrPluginOptions); initialize: ({ instance }: { instance: AnalyticsInstance; }) => void; [PROFILE_CHANGE]: EventHandler<ProfileChangedPayload>; [PROFILE_RESET]: EventHandler; } export {};