ingrow-js-sdk
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "ingrow-js-sdk", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "javascript SDK to using the Ingrow event streaming platform", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,18 @@ ## JS SDK | ||
## Install | ||
Install with npm: | ||
npm install ingrow-js-sdk | ||
Or with yarn: | ||
yarn add ingrow-js-sdk | ||
## Import | ||
Import ingrow with: | ||
import ingrow from "ingrow-js-sdk" | ||
## Initialize | ||
@@ -12,5 +28,12 @@ | ||
By default the IP of user will attached automatically but You can | ||
overwrite by sending the according IP in your your custom data. | ||
It is possible to trace events related to specific user by adding `user id` to arguments | ||
and initialize like this: | ||
const myIngrow = new ingrow("API_KEY", "PROJECT_ID", "USER_ID") | ||
By default ingrow set a cookie for every user, that can be gravely useful for data analysis | ||
By default the IP of user will attached automatically to events but You can | ||
overwrite by sending the according IP in your custom data with `IP` key. | ||
## Send Event | ||
@@ -27,7 +50,2 @@ | ||
`sendEvent` method will return a promise, so you can handle success or failure of event sending like other promises. | ||
## Configurations | ||
By default the event endpoint is Ingrow's event listener endpoint. In the case of on-premises deployment, you can set an environment variable named `LUNGO_ENDPOINT` to change this address. | ||
`sendEvent` method will return a promise, so you can handle success or failure of event sending, like other promises. |
9036
49