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

socketkit

v0.7.0

Published

Next-gen behavior analysis server with built-in encryption supporting HTTP2 and gRPC.

Downloads

5

Readme

Socketkit JavaScript SDK

Access Socketkit using cross-platform JavaScript SDK to anonymously track and understand user behavior with built-in security.

Install

npm i --save socketkit

Setup

import Socketkit from 'socketkit'
import { randomUUID } from 'crypto'

const options = {
  authorization_key: 'authorization_key',
  signing_key: 'signing_key'
}
const client = new Socketkit(options)

// Store this preferably in your own database for future reference.
const clientId = randomUUID()
client.setClientId(clientId)
client.sendEvent({ name: 'custom', timestamp: new Date().toISOString(), custom_key: 'value' })

Send events

app_open

App open event type should be sent when the application is booted. Includes characteristic features of a client for analytical purposes. For properties and their requirements please look into the definition.

client.sendEvent({
  name: "app_open",
  timestamp: new Date().toISOString(),
  locale: 'en-US',
  manufacturer: 'Apple',
  platform: 'ios',
  type: 'iPad13,1',
  carrier: 'T-Mobile',
  os_name: 'iOS',
  os_version: '14.4.1',
  screen_size: [2778, 1284],
  application_build_number: 14,
  application_version: '1.0.0',
  library_version: '0.4.1',
  watch_model: 'Apple Watch 38mm', // if the client is watchOS.
})

in_app_purchase

Includes all the information related to tracking a in app purchase payment. For properties and their requirements please look into the definition.

client.sendEvent({
  name: "in_app_purchase",
  timestamp: new Date().toISOString(),
  product_name: "Weekly Package",
  product_quantity: 1,
  product_price: 4.99,
  product_currency: "USD"
})

set_client

Set client event type gives the ability to store more information about the user. It should not store any identifiable data for privacy compliance. For properties and their requirements please look into the definition.

client.sendEvent({
  name: "set_client",
  timestamp: new Date().toISOString(),
  distinct_id: null,
  referer: "Google",
  push_token: null,
  is_opt_out: false, // required for GDPR compliance
  additional_properties: {
    ab_test_enabled: false
  }
})

custom

Custom event type gives the user the ability to send any kind of data to the Awacs server. For properties and their requirements please look into the definition.

client.sendEvent({
  name: "custom",
  timestamp: new Date().toISOString(),
  random_key: "value"
})