# @panelbear/panelbear-js

> Official Panelbear client (browser)

Latest version **1.3.3** (published 2021-12-08) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @panelbear/panelbear-js
pnpm add @panelbear/panelbear-js
yarn add @panelbear/panelbear-js
bun add @panelbear/panelbear-js
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2021-12-08 |
| First published | 2020-12-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Anthony N. Simon |
| Maintainers | anthonynsimon |
| Keywords | panelbear, analytics |

## Links

- npm: https://www.npmjs.com/package/@panelbear/panelbear-js
- Repository: https://github.com/panelbearhq/panelbear-js
- Homepage: https://github.com/panelbearhq/panelbear-js#readme
- Issues: https://github.com/panelbearhq/panelbear-js/issues
- npm.io page: https://npm.io/package/@panelbear/panelbear-js

## Recent versions

- 1.3.3 (latest) — 2021-12-08
- 1.3.2 — 2021-09-10
- 1.3.1 — 2021-09-10
- 1.3.0 — 2021-09-10
- 1.2.0 — 2021-01-18
- 1.1.0 — 2020-12-02
- 1.0.2 — 2020-12-02
- 1.0.0 — 2020-12-02

## README

# Panelbear client (browser)

A simple JavaScript library for [Panelbear Analytics](https://panelbear.com).

## Highlights

- Just a thin wrapper around the Panelbear analytics script.
- Integrates with most JS frameworks.
- Typed (Typescript).

## Quickstart

### Install

Run the following command to install in your project:

```
npm install @panelbear/panelbear-js
```

Or with yarn:

```
yarn add @panelbear/panelbear-js
```

### Basic usage

You can now import, and use the Panelbear client on your project.

```javascript
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');
```

## Framework integrations

- [Next.js](https://www.npmjs.com/package/@panelbear/panelbear-nextjs)
- [Vuepress](https://www.npmjs.com/package/@panelbear/vuepress-plugin-panelbear)
- [Gatsby](https://www.npmjs.com/package/gatsby-plugin-panelbear)

## Changelog

### 1.3.3

- Handle error on bind queue to window when element with same name exists (eg. <div id="panelbear"></div>).

### 1.3.2

- Update docs.

### 1.3.1

- Export config interface and event schema.

### 1.3.0

- Update PanelbearConfig interface available fields.
- Upgrade package dependencies.
- Add interface docs.

### 1.2.0

- Allow scriptSrc config option to load Panelbear script from own domain.

### 1.1.0

- By default, load tracker with `autoTrack` set to `false`.

### 1.0.2

- Initial open source release.

## Security Disclosure

If you discover any issue regarding security, please disclose the information responsibly by following the instructions [here](https://panelbear.com/security/). Do NOT create a Issue on the GitHub repo.

## Contributors

[@jondcallahan](https://github.com/jondcallahan)

## Contributing

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.

## License

See [LICENSE](https://github.com/panelbearhq/panelbear-js/blob/master/LICENSE).

---
_Source: https://npm.io/package/@panelbear/panelbear-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
