1.0.0 • Published 8 years ago

clevertap-react v1.0.0

Weekly downloads
329
License
ISC
Repository
github
Last release
8 years ago

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
import ClevertapReact from 'clevertap-react';

ClevertapReact.initialize("CLEVERTAP_ACCOUNT_ID");

API

First import library in your component

import ClevertapReact from 'clevertap-react';

  • Push Event
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
var payload = {
  "Site": {
   "Name": "Jack Montana", // User's name
   "Age": 28
 }
}

ClevertapReact.profile(payload)
  • Logout
ClevertapReact.logout()

TODO

  • Documentation
  • Examples
  • Support for Push Notifications.
1.0.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago