@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.