Appearance
NPM
Prerequisites
Before you get started, you need to:
Installation
Use your preferred package manager to install Honeypot:
sh
$ npm add @honeypot-run/coresh
$ pnpm add @honeypot-run/coresh
$ yarn add @honeypot-run/coreImporting
The next step is to import and initialize the Collector.
You will need to pass in the URL for your honeypot, which can be found on the
Honeypots page.js
import { honeypot } from '@honeypot-run/core';
const url = 'https://<my-honeypot-url>/js'
honeypot.setup({ url })Once you've initialized Honeypot using the code above, you're ready to track events.
Typescript support
We recommend utilizing TypeScript for improved developer experience and prevention of common errors.
The type definitions for the Honeypot SDKs are included with the library. For more information, review our TypeDocs documentation.