@everflow/everflow-sdk

中文文档
1.8.0发布于 2026/11/11UNLICENSEDCommonJS近 30 天下载 2.9万

Everflow's javascript SDK

原始使用文档
文档目录3 节
  1. Usage
  2. Documentation
  3. Running locally

npm (scoped)

Usage

Get the latest version of the SDK on npm here.

Configure the SDK before doing any tracking.

EF.configure({
    // You only need to set the tracking domain you want to use
    tracking_domain: 'https://<tracking-domain>.com',
})

If using the NPM module, the Everflow SDK instance is exported as default.

const EverflowSDK = require('@everflow/everflow-sdk');

EverflowSDK.configure({
    // You only need to set the tracking domain you want to use
    tracking_domain: 'https://<tracking-domain>.com',
})

Documentation

Usage directives and examples can be found on our developer hub

Running locally

To test the SDK locally:

  1. Switch the tracking script to HTTPS. In the Go repo, open pkg/event/handler/script.go and change the scheme:
   // before
   scheme := "http"
   // after
   scheme := "https"
  1. Create an index.html file with the tracking script found on the offer, in the Tracking card:
   <!DOCTYPE html>
   <html>
   <body>
       <!-- paste the script from the offer's Tracking card here -->
       <h1>My First Heading</h1>
       <p>My first paragraph.</p>
   </body>
   </html>
  1. Serve the file over HTTP:
   python3 -m http.server 9001
  1. Fire a click by opening the page with the offer and affiliate IDs:
   http://127.0.0.1:9001/index.html?oid=1&affid=7

版本与发布记录

@everflow/everflow-sdk 共发布 20 个版本,首次发布于 2020/11/20;过去 12 个月发布了 4 个版本。

版本发布日期距今
1.8.0latest2026/11/112 天前
1.7.02026/09/092 个月前
1.6.02026/08/182 个月前
1.5.02025/12/1011 个月前
1.4.02025/09/111.2 年前
1.3.02025/09/081.2 年前

关于 @everflow/everflow-sdk 的常见问题

@everflow/everflow-sdk 是什么?

Everflow's javascript SDK

如何安装 @everflow/everflow-sdk?

在项目目录运行 npm install @everflow/everflow-sdk,或使用 pnpm add / yarn add / bun add。

@everflow/everflow-sdk 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/everflow__everflow-sdk 是否存在。

@everflow/everflow-sdk 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@everflow/everflow-sdk 可以商用吗?

@everflow/everflow-sdk 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@everflow/everflow-sdk 的下载量有多少?

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

@everflow/everflow-sdk 还在维护吗?

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