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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tracking-wallet

v5.5.3

Published

Tracking wallet ======================== ## v5.5.1 - add the properties in camelCase to the events, keeping the old ones.

Downloads

11

Readme

Tracking wallet

v5.5.1

  • add the properties in camelCase to the events, keeping the old ones.

v5.4.0

  • added dynamic props to page method under TrackingWallet class
  • each page view / Loaded a page event now can be customized with new properties by passing in argument

v5

  • removes jquery from the bundle. This may introduce some breaking changes in the projects which still rely on it.
  • support for Server Side Rendering (only uses window if it's available)
  • recovered agent identification functionality from v4
  • userRole tracking property automatically detected from session + cookies for one of the following values:
    • insured
    • agent
    • CW Internal User
    • CW test
  • Simplified alias logic. Only sends an alias call to Segment/Mixpanel if the userRole is NOT agent
  • NO event is sent to Segment if the userRole is CW Test (internal automated tests)

Migrate from v4 to v5

  • extractDataForm method deprecated. JQuery is removed from the library, tracking-wallet is no longer in charge of gathering the data from hidden inputs: each host project will provide the data for the event methods in their own way.
  • init method deprecated and with it, the skipPageViewEvents option is deprecated too. Tracking-wallet will no longer emit a custom event for page views. For a page view event just use trackingWallet.page(). To start using the library, it is enough just to instantiate it:
import TrackingWallet from "tracking-wallet"
const tracker = new TrackingWallet();
tracker.track();
  • preserveUTMTags method deprecated. Just remove it's calls.
  • getUserId method deprecated. Use the following instead:
const id = trackingWallet.getAnalyticsUser().userId;

Migrate from v3 to v4

  • Remove calls to timeEvent method. The calls can stay but will fall back to an additional track event for the same event name ended in _TIME_EVENT
  • Remove all references to window.mixpanel from the project

Usage

ES6 Module:

import TrackingWallet from 'tracking-wallet';

const trackingWallet = new TrackingWallet();
trackingWallet.identify('userId', { /* User traits */ });
trackingWallet.track({ /* Event */}, { /* Event options */});

or use the bundled version:

<script type="text/javascript" src="<path>/dist/tracking-wallet.min.js"></script>
<script type="text/javascript">
    var trackingWallet = new window.TrackingWallet();
    trackingWallet.identify('userId', { /* User traits */ });
    trackingWallet.track({ /* Event */}, { /* Event options */});
</script>
  • If window.analytics object is not ready before event is sent this event is stored in the queue and gets processed as soon as window.analytics is ready.

Developement

You don't need to run a separate script to bundle the minified version of the code. It will be done automatically and added to your commit when you make changes in the src directory.