@ghostery/trackerdb

中文文档
1.0.974发布于 2026/11/14CC-BY-NC-SA-4.0TypeScriptESM + CJS构建来源已验证近 30 天下载 7802

Ghostery Tracker Database

原始使用文档
文档目录7 节
  1. Terminology
  2. Where is it used?
  3. SDK
  4. CLI
  5. How can I get involved?
  6. Data Partners
  7. Licensing

Ghostery Tracker Database

Transparency is at the heart of Ghostery experience. This is why Ghostery not only blocks ads, trackers, and other annoyances, but also shows how online tracking works by naming all the organizations that participate in data exchange over internet.

Terminology

Data exchange can easily uncover personal details by private identifiers, often referred to as tracking. However, not every request from an organization involves data collection (i.e., not every request an organization makes is inherently invasive). Organizations often display a range of behavioral patterns, some of which can be intrusive to user privacy, while others are benign.

At Ghostery, we're committed to describing things exactly as they are.

The structure of Ghostery Tracker Database is simple and consists of three main elements:

Where is it used?

The Tracker Database is used in Ghostery Browser Extension to categorize all requests we see while browsing the web. It is also used to publish WhoTracks.me, the world's largest statistical report on the tracking online.

It is also used by universities, journalists, and companies that want to understand the nature of the web data exchange.

SDK

The Ghostery Tracker Database comes with a JavaScript SDK. Sample usage:

import { readFileSync } from 'node:fs';
import loadTrackerDB from '@ghostery/trackerdb';

const engine = readFileSync('./node_modules/@ghostery/trackerdb/dist/trackerdb.engine');
const trackerDB = await loadTrackerDB(engine);

const domainMatches = await trackerDB.matchDomain('google.com');

const urlMatches = await trackerDB.matchUrl({
    url: 'https://google.com/gen_204',
    type: 'xhr',
    sourceUrl: 'https://google.com/'
}, {
    getDomainMetadata: true,
});

CLI

Ghostery Tracker Database can also be used in a command line, for example with:

npx @ghostery/trackerdb "https://analytics.tiktok.com"

Output:

{
  "url": "https://analytics.tiktok.com",
  "matches": [
    {
      "pattern": {
        "key": "tiktok_analytics",
        "name": "TikTok Analytics",
        "category": "site_analytics",
        "organization": "bytedance_inc",
        "alias": null,
        "website_url": "https://analytics.tiktok.com",
        "ghostery_id": "4050",
        "domains": [
          "analytics.tiktok.com"
        ],
        "filters": [
          "||analytics.tiktok.com^$3p"
        ]
      },
      "category": {
        "key": "site_analytics",
        "name": "Site Analytics",
        "color": "#87d7ef",
        "description": "Data analytics, site usage, and performance trackers."
      },
      "organization": {
        "key": "bytedance_inc",
        "name": "ByteDance Inc",
        "description": "ByteDance, a Chinese multinational internet technology company headquartered in Beijing and legally domiciled in the Cayman Islands. Its main product is TikTok, known in China as Douyin, a video-focused social networking service.",
        "website_url": "https://www.bytedance.com/",
        "country": "KY",
        "privacy_policy_url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/upsnuhpevbn/bytedance_official/PrivacyPolicy_ByteDance.com.pdf",
        "privacy_contact": "[email protected]",
        "ghostery_id": "5432"
      }
    }
  ]
}

How can I get involved?

We encourage contributions from developers of all levels. If you come across any errors, such as typos, inaccuracies, or outdated information, please don't hesitate to open an issue, or, even better, send us a pull request. Your feedback is highly valued!

If you are new to the project or want an easy starting point, check out our Good First Issues. These are beginner-friendly tasks to help you get acquainted with our project. If you are unsure about an issue or have questions, feel free to ask in the issue comments.

Data Partners

Big thanks to the companies collaborating closely with us to enhance the quality of this project. Their ongoing contributions are pivotal in improving and refining the information. We highly value their partnership and dedication to achieving top-notch quality!

Licensing

Ghostery Tracker Database is published under CC-BY-NC-SA-4.0 license which means it is free to use for non-commercial purposes. If you want to use it in your business, please contact [email protected].

版本与发布记录

@ghostery/trackerdb 共发布 963 个版本,首次发布于 2023/02/24;过去 12 个月发布了 282 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.974latest2026/11/142 天前
1.0.9732026/11/132 天前
1.0.9722026/11/114 天前
1.0.9712026/11/106 天前
1.0.9702026/11/106 天前
1.0.9692026/11/079 天前

关于 @ghostery/trackerdb 的常见问题

@ghostery/trackerdb 是什么?

Ghostery Tracker Database

如何安装 @ghostery/trackerdb?

在项目目录运行 npm install @ghostery/trackerdb,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 trackerdb,可以用 npx trackerdb 直接运行。

@ghostery/trackerdb 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ghostery/trackerdb 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@ghostery/trackerdb 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ghostery/trackerdb 可以商用吗?

@ghostery/trackerdb 使用 CC-BY-NC-SA-4.0 许可。声明的许可为 CC-BY-NC-SA-4.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@ghostery/trackerdb 的下载量有多少?

根据 npm 官方下载统计,@ghostery/trackerdb 在 2026/10/17 – 2026/11/15 这 30 天内被下载 7,802 次,日均约 260 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ghostery/trackerdb 还在维护吗?

最新版本 1.0.974 发布于 2026/11/14(2 天前);至今共发布 963 个版本,其中过去 12 个月发布了 282 个;首次发布于 2023/02/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。