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 🙏

© 2026 – Pkg Stats / Ryan Hefner

slacktivity

v1.1.1

Published

Slacktivity is a lightweight analytics library that allows you to send crucial user activity directly to your team's Slack.

Readme

Slacktivity

Do you want to know right away when your users do something really important? Slacktivity is a lightweight Javascript analytics library that allows you to send crucial user activity directly to your team's Slack. It's especially great for startups to know exactly what their early users are doing.

demo

Why use Slacktivity?

Slacktivity has a different use case than traditional analytics platforms such as Google Analytics and Mixpanel. These platforms are fantastic for gathering tons of data on users and giving a clean interface to later interpret user behavior. Slacktivity, on the other hand, shines when there are special and relatively rare user events that you wanted to be notified of right away.

Some examples of when Slacktivity would be useful are:

  • You're an early-stage startup with only a few users, and you want to be notified any time a user logs in.
  • You're a SaaS company that just released a new, special feature to a small set of customers, and you want to know exactly when your customers use the new feature, and how they're using it.
  • You have a crucial feature that should never break, but you want to be notified immediately if it does.

Installation

bower install slacktivity

or

npm install slacktivity

or

Copy slacktivity.js into your project and add <script src="slacktivity.js"> to your HTML header.

Configuration

If you haven’t already, set up an incoming Webhook in the integrations section of your Slack dashboard.

In the config section at the top of slacktivity.js, add your own webhook_url. You also have the option to add a custom title, icon_url, or text in the config.

Usage

#Overview

After you include the script into your page, it binds a Slacktivity object to the window. To fire an event to your Slack channel, call it from any Javascript on the page:

	window.Slacktivity.send({
		“User Email”: “[email protected]”,
		“Company”: “Apple, Inc.”
	});

where the parameter is an object of key-value pairs of data. Feel free to specify any custom attributes in the parameter object.

Metadata Custom Keys

There are some specific keys you can include to modify the post’s metadata. By default, they include:

  • “title”: The post’s title
  • “text”: The text below the title
  • “color”: The post sidebar color (a hex string like "#0393DD")
  • “fallback”: The notification’s banner text
  • “icon_url”: The icon next to the Slack post
  • "channel": Override the default webhook's channel to send to other channels (ex. "#random")

To fire an event, call:

window.Slacktivity.send();

Specify any custom attributes as an object. For example,

window.Slacktivity.send({"title": "Important Login Event!", "icon_url": "http://a.abcnews.go.com/images/Technology/GTY_Apple_CEO_Tim_Cook_MT_140716_25x14_992.jpg", "Company": "Apple, Inc.", "User Email": "[email protected]”, "text": "Tim Cook just logged in"})

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/MightySignal/slacktivity. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The project is available as open source under the terms of the MIT License.

Blog Post about Slacktivity

https://medium.com/@MightySignal/slacktivity-a-javascript-library-that-tells-you-right-away-when-your-users-do-something-really-efe18e6cbd74