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

h5tracker

v0.2.2

Published

Logs Tracker of Mobile

Readme

h5tracker 移动端页面统计框架

NPM version Build Status Coverage Status

Features(功能点)

  1. Offline Storage.(离线存储)
  2. File size is small.(文件小)
  3. Manage multiple statistical modules.(统计模块并行)
  4. Session life cycle. (会话生命周期)

Usage(使用方法)

Entry Script(入口脚本)

<script src="../lib/inline.min.js?__inline" h5t-config='{"cdn":"../h5tracker.js"}'></script>

App Options(应用配置)

h5t('config', {
  sessionExpires: 30, // session 过期时间,单位:秒
  storageExpires: 10 * 24 * 60 * 60, // 存储过期时间,单位:秒
});

Create a Tracker(创建追踪器)

h5t('main.create', {
  accept: 'http://log.server.com/c.gif', // 日志接收地址 // send 时必须带上
  acceptStyle: 'query', // 日志接收方式,"query": 查询参数,"path": 路径,默认为: "query"
  data: { // 常规数据
    dm: document.domain,
    lo: document.location.pathname
  },
  event: { // 事件
    send: function (data) { // 发送数据时触发
      data.token = this.token(data);
    },
    createSession: function () { // Session 创建
      this.send({
        ht: 'appview'
      });
    }
  }
});

Send the data(发送数据)

h5t('main.send', { // 发送数据
  path: 'xxx' //
});

Data Struct(数据结构式)

App 数据

字段 | 全称 | 含义 | 备注 -----|---------------|----------|---------- do | domain | 域名 | 来至 document lo | location | 路径 | 来至 document rid | record id | 记录 ID | 临时生成
uid | user id | 用户 ID | 来至 localStorage sid | session id | 会话 ID | 来至 sessionStorage seq | session seq | 会话序号 | 来至 sessionStorage time | relative time | 相对时间 | 36 进制,参考 session 创建时间 trn | tracker name | 追踪器名 | 默认 null

Session ID(会话标识)

  • sessionStorage['h5t@global/sessionId']

Session Seq(会话序号)

  • sessionStorage['h5t@global/sessionSeq']

User ID(用户标识)

  • localStorage['h5t@global/userId']

Last scan the storage time(最后扫描的时间)

  • localStorage['h5t@global/scanTime']

License

MIT © zswang