Noisy Pillaging Monster

    @wildberries/wb-front-analytics-tracker
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.4 • Public • Published

    @wildberries/wb-front-analytics-tracker

    This package designed for wildberries analytics and contains:

    • analyticsEventEmitter - sender function for analytics
    • withAnalytics - HOC for React components
    • SHARED_EVENTS - shared event constants

    analyticsEventEmitter contains methods:

    • init - method to initialize analyticsEventEmitter, params:
      • prefix (string, non requred) - will be added to all events if in the events will be custom
    • getIsInitialized - method to check if analyticsEventEmitter was initialized
    • sendEvent - method to send events, params:
      • name (string, required) - event name
      • params (any, required) - event params
      • customEvent (boolean, required) - need to add prefix or not

    withAnalytics injects method:

    • sendAnalytics, params:
      • name (string, required)
      • params (any, required)
      • customEvent (boolean, required)

    SHARED_EVENTS:

    export const SHARED_EVENTS = {
      PAGE_VIEW: 'pageview',
      PERFORMANCE: 'suppliers-portal-front-performance',
    };

    Keywords

    none

    Install

    npm i @wildberries/wb-front-analytics-tracker

    DownloadsWeekly Downloads

    367

    Version

    1.1.4

    License

    MIT

    Unpacked Size

    12.4 kB

    Total Files

    12

    Last publish

    Collaborators

    • mihanizm56
    • ramison4ik