# english-patient-analytics

> widget for english-patient

Latest version **1.2.8** (published 2021-04-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install english-patient-analytics
pnpm add english-patient-analytics
yarn add english-patient-analytics
bun add english-patient-analytics
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.8 |
| Published | 2021-04-04 |
| First published | 2021-03-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Roman,Ilya |
| Maintainers | domino1198, atlas_ilya |
| Keywords | widget, wget, analytics, english-patient, english-patient-analytics |

## Links

- npm: https://www.npmjs.com/package/english-patient-analytics
- Repository: https://github.com/atlas-ilya/react-analytics
- Homepage: https://github.com/atlas-ilya/react-analytics#readme
- Issues: https://github.com/atlas-ilya/react-analytics/issues
- npm.io page: https://npm.io/package/english-patient-analytics

## Dependencies (6)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [@types/jest](https://npm.io/package/@types/jest.md) ^26.0.21
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.35
- [@types/react](https://npm.io/package/@types/react.md) ^17.0.3
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^17.0.2
- [@fingerprintjs/fingerprintjs](https://npm.io/package/@fingerprintjs/fingerprintjs.md) ^3.0.6

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.2.8 (latest) — 2021-04-04
- 1.2.7 — 2021-04-04
- 1.2.6 — 2021-03-22
- 1.2.5 — 2021-03-22
- 1.2.4 — 2021-03-22
- 1.2.3 — 2021-03-22
- 1.2.2 — 2021-03-22
- 1.2.1 — 2021-03-22
- 1.2.0 — 2021-03-21
- 1.1.4 — 2021-03-20
- 1.1.3 — 2021-03-20
- 1.1.2 — 2021-03-20
- 1.1.1 — 2021-03-20
- 1.1.0 — 2021-03-20
- 1.0.7 — 2021-03-19
- … 7 more at https://npm.io/package/english-patient-analytics/versions

## README

# Wget for English-Patient

## Install to npm

### `npm install english-patient-analytics`

## Install to yarn

### `yarn add english-patient-analytics`

## Connect to app
To add our widget to the site, add the initialization of the application itself + identification of the user who entered the application

### Example
```js
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import {initialize,identify} from "english-patient-analytics"

const data = {
  objectId: "6055a40d89b2ab34955bea38",
  avatar: "https://source.unsplash.com/100x100/?random=3&people",
  userRole: "teacher",
  firstName: "Vickie",
  lastName: "Jones",
  company: "Isonus",
  email: "vickiejones@isonus.name",
  tags: ["incididunt", "ullamco", "minim", "in", "deserunt"],
};
initialize("c29a173183fa9df334cae1cb66307baca9de58cd9d8462f0720488d1ea9f2ca6",'https://api.tsu-examples.sabir.pro/api');
identify(data);

    ReactDOM.render(
        <App />,
        document.getElementById('root')
    );



```

### initialize
you must insert your application token and  baseURL your web app into initialization before identification

### API initialize

```js
    import {initialize} from "english-patient-analytics"

    initialize(token: string, baseURL:string): void 
```


### identify
it is possible to insert less voluminous objects into the identification, but there must be fields such as
```js
    const data = {
        objectId: String,
        email: String,
        firstName: String,
        lastName: String,
        userRole: String,
        avatar: String,
        tags: JSON.stringify(Array),
    }
```
### API identify

```js
    import {identify} from "english-patient-analytics"

    identify(user: data): void 
```

## Connect to component

In order to connect the handler to the component you need to insert the track function on the component event

### Example

```js
    import {track} from "english-patient-analytics"

    <button onClick={() => track("event_btn")}>Test button</button>
```

### API track

```js
    track(event: string, options?: object, eventTagsArray?: string[]): void
```

### event: string

event name (required)

### options?: object

event description (optional)

### eventTagsArray?: string[]

event type (optional)

---
_Source: https://npm.io/package/english-patient-analytics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
