@dobeacon/sdk

中文文档
2.18.5发布于 2026/11/09SEE LICENSE IN LICENSEESM + CJS零依赖近 30 天下载 2685

DoBeacon guided tour SDK — embed tours in any website

原始使用文档
文档目录5 节
  1. Install
  2. Start
  3. Prefer a script tag?
  4. Docs
  5. License

@dobeacon/sdk

Guided tours, an in-page assistant and messages for your web app, powered by DoBeacon. Build tours in the DoBeacon dashboard or Chrome extension; this package plays them on your site.

Install

npm install @dobeacon/sdk

Start

Call init once, in the browser, with your project key (Dashboard → your project → Install). The key is public by design: it only reads published tours and posts events.

import DoBeacon from '@dobeacon/sdk';

DoBeacon.init('pk_live_YOUR_KEY');

In Next.js or any server-rendered app, call it on the client only:

if (typeof window !== 'undefined') {
  DoBeacon.init(process.env.NEXT_PUBLIC_DOBEACON_KEY);
}

Then, once your sign-in resolves, tell DoBeacon who the visitor is:

DoBeacon.identify(user.id, { name: user.name, plan: user.plan });

Prefer a script tag?

<script src="https://dobeacon.com/v2/dobeacon.min.js" data-project-key="pk_live_YOUR_KEY" async></script>

Docs

License

Proprietary. Use requires a DoBeacon account and is governed by the DoBeacon Terms of Service. See LICENSE.

版本与发布记录

@dobeacon/sdk 共发布 15 个版本,首次发布于 2026/10/27;过去 12 个月发布了 15 个版本。

版本发布日期距今
2.18.5latest2026/11/094 天前
2.1.282026/11/049 天前
2.1.272026/11/0310 天前
2.1.252026/11/0310 天前
2.1.42026/10/2915 天前
2.1.22026/10/2915 天前

关于 @dobeacon/sdk 的常见问题

@dobeacon/sdk 是什么?

DoBeacon guided tour SDK — embed tours in any website

如何安装 @dobeacon/sdk?

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

@dobeacon/sdk 支持 TypeScript 吗?

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

@dobeacon/sdk 支持 ESM 还是 CommonJS?

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

@dobeacon/sdk 可以商用吗?

@dobeacon/sdk 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@dobeacon/sdk 的下载量有多少?

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

@dobeacon/sdk 还在维护吗?

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