@types/keen-tracking
TypeScript icon, indicating that this package has built-in type declarations

4.5.3 • Public • Published

Installation

npm install --save @types/keen-tracking

Summary

This package contains type definitions for keen-tracking (https://github.com/keen/keen-tracking.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keen-tracking.

index.d.ts

export interface KeenAutoTrackingConfig {
    recordPageViews?: boolean | undefined;
    recordPageViewsOnExit?: boolean | undefined;
    recordScrollState?: boolean | undefined;
    recordClicks?: boolean | undefined;
    recordClicksPositionPointer?: boolean | undefined;
    recordFormSubmits?: boolean | undefined;
    ignoreDisabledFormFields?: boolean | undefined;
    ignoreFormFieldTypes?: string[] | undefined;
    collectIpAddress?: boolean | undefined;
    collectUuid?: boolean | undefined;
    shareUuidAcrossDomains?: boolean | undefined;
    recordElementViews?: boolean | undefined;
}

export interface KeenClient {
    config: {
        projectId: string;
        writeKey: string;
        host: string;
        protocol: string;
        requestType: string;
        resources: {
            base: string;
            version: string;
            projects: string;
            projectId: string;
            events: string;
            queries: string;
        };
    };
    _callbacks: {};
    extensions: {
        events: Array<{}>;
        collections: {};
    };
    queue: {
        capacity: number;
        config: {
            capacity: number;
            interval: number;
        };
        events: {};
        interval: number;
        timer: unknown;
    };
}

export default class KeenTracking {
    constructor(options: { projectId: string; writeKey: string; requestType?: string | undefined });
    recordEvent(collectionName: string, event: object): Promise<{ created: boolean }>;
    recordEvents(events: {
        [collectionName: string]: object[];
    }): Promise<{
        [collectionName: string]: boolean[];
    }>;
    extendEvents(payload: unknown): KeenClient;
    initAutoTracking(config: KeenAutoTrackingConfig): KeenClient;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: none

Credits

These definitions were written by Rui Ferreira, and Tudor Tacal.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/keen-tracking

Weekly Downloads

1,855

Version

4.5.3

License

MIT

Unpacked Size

6.34 kB

Total Files

5

Last publish

Collaborators

  • types