# @types/ackee-tracker

> TypeScript definitions for ackee-tracker

Latest version **5.0.4** (published 2023-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/ackee-tracker
pnpm add @types/ackee-tracker
yarn add @types/ackee-tracker
bun add @types/ackee-tracker
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.4 |
| Published | 2023-11-06 |
| First published | 2020-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51468 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/ackee-tracker
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ackee-tracker
- npm.io page: https://npm.io/package/@types/ackee-tracker

## Recent versions

- 5.0.4 (latest) — 2023-11-06
- 5.0.2 (ts3.8) — 2021-12-01
- 5.0.1 (ts3.6) — 2021-07-07
- 5.0.0 (ts3.4) — 2021-01-25
- 4.0.0 (ts3.1) — 2020-08-21
- 5.0.3 — 2023-10-17

## README

# Installation
> `npm install --save @types/ackee-tracker`

# Summary
This package contains type definitions for ackee-tracker (https://github.com/electerious/ackee-tracker).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ackee-tracker.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ackee-tracker/index.d.ts)
````ts
export interface TrackingOptions {
    /**
     * Defaults to `true`
     */
    ignoreLocalhost?: boolean | undefined;
    /**
     * Defaults to `false`
     */
    detailed?: boolean | undefined;
    /**
     * Defaults to `true`
     */
    ignoreOwnVisits?: boolean | undefined;
}

export interface AckeeTrackingReturn {
    stop: () => void;
}

export interface ActionAttributes {
    /**
     * Key that will be used to group similar actions in the Ackee UI.
     */
    key: string;
    /**
     * Positive float value that is added to all other numerical values of the key.
     */
    value?: number | undefined;
}

export interface AckeeInstance {
    record: (domainId: string, attrs?: ReturnType<typeof attributes>) => AckeeTrackingReturn;
    updateRecord: (recordId: string) => AckeeTrackingReturn;
    action: (eventId: string, attributes: ActionAttributes, callback?: (actionId: string) => void) => void;
    updateAction: (actionId: string, attributes: ActionAttributes) => void;
}

export interface DefaultData {
    siteLocation: string;
    siteReferrer: string;
}

// Based on https://github.com/bestiejs/platform.js/blob/master/platform.js
export interface DetailedData {
    siteLanguage: string;
    screenWidth: number;
    screenHeight: number;
    screenColorDepth: number;
    deviceName: string | null;
    deviceManufacturer: string | null;
    osName: string | null;
    osVersion: string | null;
    browserName: string | null;
    browserVersion: string | null;
    browserWidth: number;
    browserHeight: number;
}

export function create(server: string, options?: TrackingOptions): AckeeInstance;

export function attributes(detailed?: false): DefaultData;
export function attributes(detailed: true): DefaultData & DetailedData;
export function attributes(detailed?: boolean): DefaultData | (DefaultData & DetailedData);

export function detect(): void;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:04 GMT
 * Dependencies: none

# Credits
These definitions were written by [Pablo Sáez](https://github.com/PabloSzx), [Spencer Elliott](https://github.com/elliottsj), and [Sebastian Krüger](https://github.com/mathe42).

---
_Source: https://npm.io/package/@types/ackee-tracker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
