# clevertap-react

> Wrapper to integrate Clevertap with ReactJS Applications

Latest version **1.0.0** (published 2017-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install clevertap-react
pnpm add clevertap-react
yarn add clevertap-react
bun add clevertap-react
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-01-18 |
| First published | 2017-01-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Harsh Maur |
| Maintainers | harshmaur |
| Keywords | react, clevertap |

## Links

- npm: https://www.npmjs.com/package/clevertap-react
- Repository: https://github.com/harshmaur/clevertap-react
- Homepage: https://github.com/harshmaur/clevertap-react#readme
- Issues: https://github.com/harshmaur/clevertap-react/issues
- npm.io page: https://npm.io/package/clevertap-react

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-01-18
- 0.0.6 — 2017-01-09
- 0.0.5 — 2017-01-09
- 0.0.4 — 2017-01-09
- 0.0.3 — 2017-01-09
- 0.0.2 — 2017-01-09
- 0.0.1 — 2017-01-09

## README

# clevertap-react
Wrapper to integrate Clevertap with ReactJS Applications. 


Technically it should work with Any SPA like Angular, Vue, etc. 
It should also support React Native. (untested)


*PR and Issues are welcomed*

### Usage

- Installation `npm install --save clevertap-react`
- Initialize in your root

```js
import ClevertapReact from 'clevertap-react';

ClevertapReact.initialize("CLEVERTAP_ACCOUNT_ID");
```

### API

First import library in your component 

`import ClevertapReact from 'clevertap-react';`

- Push Event

```js
var payload = {
  "Product name":"Casio Chronograph Watch",
  "Category":"Mens Accessories",
  "Price":59.99,
}

ClevertapReact.event("Product Viewed", payload)

// Payload is optional, if you dont want to pass it, you can just do 
ClevertapReact.event("Product Viewed")
```

- Profile Push
```js
var payload = {
  "Site": {
   "Name": "Jack Montana", // User's name
   "Age": 28
 }
}

ClevertapReact.profile(payload)
```

- Logout
```js
ClevertapReact.logout()
```


### TODO

- [x] Documentation
- [ ] Examples
- [ ] Support for Push Notifications.

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