UNPKG

@yext/analytics

Version:

An analytics library for Yext

30 lines 1.15 kB
import { AnalyticsConfig } from './AnalyticsConfig'; import { AnalyticsEventService } from './AnalyticsEventService'; /** * The Yext Analytics Events SDK. * Returns an AnalyticsEventService given an AnalyticsConfig. * @public */ export declare function analytics(config: AnalyticsConfig): AnalyticsEventService; /** * An alternative entry point for the Yext Analytics Events SDK, currently used by Google Tag Manager. * This method reads the config and payload from the variable analyticsEventPayload stored * in the global window object. The config and payload are then passed to the report function to be sent * to the Yext Analytics Events API. * @public */ export declare function reportBrowserAnalytics(): Promise<string>; export * from './AnalyticsConfig'; export * from './AnalyticsEventService'; export * from './Environment'; export * from './Region'; export * from './EventPayload'; export * from './Action'; export * from './VersionLabel'; declare global { interface Window { analyticsEventPayload?: GTMPayload; } } type GTMPayload = Record<string, Record<string, unknown>>; //# sourceMappingURL=index.d.ts.map