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

@getvero/tracking

v2.1.0

Published

The official JavaScript/TypeScript SDK for tracking user properties and events on Vero

Downloads

547

Readme

@getvero/tracking

NPM Version npm bundle size

Vero is an email marketing platform that allows you to engage and re-engage your customer base based on the actions they perform in your software.

This NPM package is the official JavaScript/TypeScript library that allows you to interact with Vero's tracking API from your JavaScript application with ease.

This library works in both Node.js and browser environments.

Usage

To get started with this library, you'll need to obtain your tracking API key from the Vero Settings page for your project.

There are two methods to reference this library in your project:

Method 1: <script> Tag

This is the simplest way to use this library in your project if you want to track events and user properties on the client-side of your website.

Insert the following code into your <head> section of your HTML document:

<script src="https://cdn.jsdelivr.net/npm/@getvero/[email protected]/dist/index.window.js"></script>
<script>
    vero.tracker.init({
        trackingApiKey: "<YOUR_TRACKING_API_KEY_HERE>"
    })
</script>

When the user logs in, you should call the user.identify method:

vero.tracker.user.identify({
    id: "<USER_ID_HERE>",
    email: "<USER_EMAIL_HERE>"
})

To track an event, you can call the event.track method:

vero.tracker.event.track({
    eventName: "<EVENT_NAME_HERE>",
    data: {
        // Add any additional data you want to track
    }
})

Please make sure you have called user.identify before calling event.track so the event can be attributed to the correct user. Otherwise, the event.track call will throw an error.

When the user logs out, you should call vero.tracker.user.unidentify() so future events will not be accidentally associated with the user.

Method 2: NPM Package

This is the recommended way to use this library on both client-side and server-side of your website.

First, install the @getvero/tracking package:

npm install @getvero/tracking

If you only need one instance of the Tracker class (singleton), this package's default export will work for you:

// Put this in the entry point of your application

import tracker from '@getvero/tracking'

tracker.init({
    trackingApiKey: "<YOUR_TRACKING_API_KEY_HERE>"
})

You can then use the singleton tracker instance to track events and user properties:

import tracker from '@getvero/tracking'

tracker.user.identify({
    id: "<USER_ID_HERE>",
    email: "<USER_EMAIL_HERE>"
})

tracker.event.track({
    // The `identity` is required in Node.js environment as `user.identify` doesn't remember the user's identity 
    // unlike in a browser environment
    identity: {
        userId: "<USER_ID_HERE>",
        email: "<USER_EMAIL_HERE>"
    },
    eventName: "<EVENT_NAME_HERE>",
    data: {
        // Add any additional data you want to track
    }
})

If you need multiple instances of the Tracker class, you can use the named export:

import {Tracker} from '@getvero/tracking'

const tracker = new Tracker({
    trackingApiKey: "<YOUR_TRACKING_API_KEY_HERE>"
})

tracker.user.identify({
    id: "<USER_ID_HERE>",
    email: "<USER_EMAIL_HERE>"
})

tracker.event.track({
    // The `identity` is required in Node.js environment as `user.identify` doesn't remember the user's identity 
    // unlike in a browser environment
    identity: {
        userId: "<USER_ID_HERE>",
        email: "<USER_EMAIL_HERE>"
    },
    eventName: "<EVENT_NAME_HERE>",
    data: {
        // Add any additional data you want to track
    }
})

In browser environments, when the user logs out, you should call user.unidentify() so future events will not be accidentally associated with the user:

tracker.user.unidentify()

For more details about the methods and their usages, please refer to the TypeScript type definitions and the JSDoc comments.

Feedback and Contributions

We welcome feedback and contributions from the community.

If you have any questions or suggestions, please open an issue on GitHub or reach out to us at [email protected].

Pull requests are welcome.

License

This library is distributed under the MIT License. See LICENSE for more information.