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

node-gtag4

v0.1.4

Published

A lightweight, browser api-free and Node.js version of the Google Analytics SDK, the data reporting is accepted by Google Analytics 4. The primary purpose of this SDK is to assist early-stage tool projects in collecting usage data and improving their pro

Downloads

11

Readme

node-gtag4

A lightweight, browser api-free and Node.js version of the Google Analytics SDK, the data reporting is accepted by Google Analytics 4. The primary purpose of this SDK is to assist early-stage tool projects in collecting usage data and improving their products at a lower cost.

node-gtag4 是一个功能精简,不依赖浏览器 API 的 Node 版本 Google Analytics SDK,数据可以上报 Google Analytics 4 到并呈现在管理后台,此SDK初衷主要是为了帮助一些早期的工具项目以较低的成本收集使用数据并且改进自己的产品。

Install

npm i node-gtag4

Usage

const ga = require('node-gtag4')('G-xxxxxx')

// report pv
ga.pv('appFunction1')

// report event
ga.event({category: 'myCategory', action: 'customAction', label:'label', value: 1})

Data Results

  • ⚠️ notice: ga4's report view is a delayed data which appeared after 24 hours, realtime view's data appeared in about 30s and stayed for 30 mins. (from my test)
  • ⚠️ 注意:ga4 的报告视图是有24小时延迟计算的数据,这意味着上报后,这块数据不会立即呈现,实时视图的数据在30s内会能看到结果,但是只保留30分钟。(经过我的测试)

data type | screenshot | --- | --- | data view (报告视图) | | realtime view (实时视图) | |

Plan

Details at issue

License

MIT

Changelog

0.1.4 (2024-05-06)

0.1.3 (2024-02-28)

0.1.2 (2023-05-12)

Bug Fixes

  • 🐛 fix github action name conflict (6a3f662)