A simple JavaScript library for Panelbear Analytics.
- Just a thin wrapper around the Panelbear analytics script.
- Integrates with most JS frameworks.
- Typed (Typescript).
Run the following command to install in your project:
npm install @panelbear/panelbear-js
Or with yarn:
yarn add @panelbear/panelbear-js
You can now import, and use the Panelbear client on your project.
import * as Panelbear from '@panelbear/panelbear-js';
// Load the Panelbear tracker once in your app
Panelbear.load('YOUR_SITE_ID');
// This is how you record page views
Panelbear.trackPageview();
// You can also trigger custom events
Panelbear.track('NewsletterSignup');
- Handle error on bind queue to window when element with same name exists (eg.
<div id="panelbear"></div>
).
- Update docs.
- Export config interface and event schema.
- Update PanelbearConfig interface available fields.
- Upgrade package dependencies.
- Add interface docs.
- Allow scriptSrc config option to load Panelbear script from own domain.
- By default, load tracker with
autoTrack
set tofalse
.
- Initial open source release.
If you discover any issue regarding security, please disclose the information responsibly by following the instructions here. Do NOT create a Issue on the GitHub repo.
Please check for any existing issues before openning a new Issue. If you'd like to work on something, please open a new Issue describing what you'd like to do before submitting a Pull Request.
See LICENSE.