npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ingrow-js-sdk

v1.1.5

Published

javascript module to help using Ingrow event streaming platform

Downloads

5

Readme

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