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

@livechat/store-metrics

v1.1.6

Published

Reads and stores various marketing parameters in Accounts Client Store. Super Important Thing for Marketing Team™. Only 3.1kB gzipped.

Downloads

747

Readme

@livechat/store-metrics

Reads and stores various marketing parameters in Accounts Client Store. Super Important Thing for Marketing Team™. Only 3.1kB gzipped.

Installation

npm install --save @livechat/store-metrics

Usage

Apps

Library exposes only one function that saves source attribution and Partner Program affiliation params based on document.location and document.referrer. Make sure to fire it as early as possible, before redirects etc.

import storeMetrics from "@livechat/store-metrics";
storeMetrics();

Websites

For websites without module bundler/resolver you can use self-executing version of store-metrics. You can load it directly from our CDN:

<script src="https://cdn.livechat-static.com/metrics/store-metrics.min.js" async></script>

And that's it.

Development

npm install
npm run test:watch

Build

npm run build

Testing locally

Make sure it is already built. Then run:

http-server -p 8000

It requires http-server to be installed. Go to http://localhost:8000/example.html?param1=value1&param2=value2 to test how params are handled.

Changelog

1.1.6 — 2024-12-11

Added

  • Extending store-metrics with tracking Partner Program landing pages

1.1.5 — 2024-09-06

Added

  • Resetting partner_id if param not found in url
  • Enabling debug mode for all environments (temporary for testing, to be removed later)

1.1.4 — 2024-08-14

Added

  • Regexes for Marketplace in whitelisted urls

1.1.3 — 2024-08-08

Added

  • Debug mode extended for urls containing development keyword

1.1.2 — 2024-08-08

Fixed

  • Fixed regexes for whitelisted urls

Added

  • Debug mode for labs/staging environments

1.1.0 — 2024-07-08

Added

  • Resetting partner_id

1.0.0 — 2021-05-25

Changed

  • Storage mechanism changed from cookies to cross-domain localStorage, to support multi-product Global Accounts
  • Because there is no 'session' concpet in localStorage, default TTL is set to 2 weeks

Removed

  • IE no longer supported
  • URL API polyfill

0.4.0 [YANKED]

0.3.0 — 2020-06-17

Added

  • All cookies are now set with SameSite='none' and Secure attributes (see: https://www.chromestatus.com/feature/5633521622188032)

0.2.1 - 2018-10-19

Added

  • ShareASale click ID first-party cookie (see: http://shareasale.com/itp/lead.htm#_Toc522268050)

0.2.0 - 2018-02-13

Added

  • Return params which were saved while executing

0.1.4 - 2017-12-12

Fixed

  • Referrer for internal redirects is no longer stored

0.1.3 - 2017-12-08

Added

  • Self-executing version for browsers
  • CDN deployment and website usage docs

Fixed

  • URL is not a constructor error

0.1.2 - 2017-12-05

Fixed

  • Cookie domain for origins not starting with www.

0.1.1 [YANKED]

0.1.0 - 2017-11-28

Initial release