Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ingrow-js-sdk

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ingrow-js-sdk

javascript module to help using Ingrow event streaming platform

  • 1.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Ingrow JS SDK

This Javascript SDK is created by Ingrow. It helps you send events in your web applications to the Ingrow event streaming platform to make insights based on them.

MIT License NPM version

Install and Initialize ingrow-js-sdk in an HTML file

<script type="text/javascript"  src="https://ingrow-cdn.s3.ir-thr-at1.arvanstorage.com/ingrow-sdk.js"></script>
<script>
    var myIngrow = new Ingrow("API_KEY", "PROJECT_ID")
</script>

Install and Initialize ingrow-js-sdk in front-end JavaScript projects

Install with npm or yarn

npm install ingrow-js-sdk

Import SDK

import Ingrow from "ingrow-js-sdk"

After importing SDK, you must initialize it by giving api key and project id that you have received from Ingrow panel.

const myIngrow = new Ingrow("API_KEY", "PROJECT_ID")

Set your users

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")

Or using setUserID method

myIngrow.setUserID("USER_ID")

By default ingrow set an id in localstorage for all users which is 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

After initializing SDK, you can send event using sendEvent() method. You must pass stream name and custom data, and optionally pass options which is described bellow. for example:

myIngrow.sendEvent("STREAM_NAME", {
    description: "paginate",
    event_type: "Click",
    element_type: "Button",
}, {
    sendDeviceInfo: false, // append some information about users device
    done: () => {}, // it will be called when it gets done
})

Keywords

FAQs

Package last updated on 11 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc