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

gigz

v3.0.0

Published

Tracking library for Gigz

Readme

gigz

Tracking library for Gigz

Installation

npm install --save gigz

Setup

In your app initialization

import gigz from 'gigz';

// Use the following if you have a custom DNS
gigz.init({ customApiUrl: "YOUR-CUSTOM-DNS" });

// OR

// Use the following if you have a token
gigz.init({ token: "YOUR-TOKEN" });

Then you can track any action with the following code

gigz.track("My first action");
gigz.track("My second action", { event_gigz_id: "XXX" });

Use the following when a user successfully authentifies on your website

gigz.engage("USER_ID", "FIRSTNAME", "EMAIL", "USER_SUBSCRIPTION_TIME");

And the following when the user signs out

gigz.reset();

Usage via a CDN

<script src="https://cdn.jsdelivr.net/npm/gigz@latest/dist/gigz.browser.min.js"></script>
<script>
	gigz.init({ YOUR-SETTINGS });
	gigz.track("My first action");
</script>

Use properties

Properties are custom parameter that you can associate with logs, in order to improve segmentation. You can pass any properties, as following:

gigz.track("A custom log", { custom_parameter: "AAA", another_parameter: "BBB" });

Map facebook users

If you want to create Facebook segments based on your website users, you must provide your Facebook pixel id during the library initialization:

gigz.init({ YOUR-SETTINGS, facebookPixelId: "YOUR-FACEBOOK-PIXEL-ID" });

Improve the user location

By default, the users location will be determined based on the user IP. This method is not very accurate, so if you want to improve the user location, you can use the Geolocation API to specify the current user location to the library.

if (navigator && navigator.geolocation) {
	navigator.geolocation.getCurrentPosition(
		position => gigz.setUserLocation(position.coords.latitude, position.coords.longitude),
		err => { }
	);

	navigator.geolocation.watchPosition(position => gigz.setUserLocation(position.coords.latitude, position.coords.longitude));
}

GDPR

You can display a predefined GDPR popup with the following code:

gigz.getGdprAuthorizations(consentData => {
	// Whatever you need to do with the user consent
});

The GDPR popup will open only the first time. After that, the authorizations will be stored in cookies in order to avoid asking the user permissions again. The consent data is structured as defined in the Transparency and Consent Framework

⚠ The GDPR popup is now a simple "ACCEPT / REFUSE" popup. Even though the choice is now a yes/no variable, we still use the Transparency and Consent Framework data format to avoid regressions ⚠