A tiny SDK (1 kB) to instrument your Browser/Chrome extensions with Aptabase, an Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps.
## Install
Install the SDK using npm or your preferred JavaScript package manager
```bash
npm add @aptabase/browser
```
## Usage
First you need to get your `App Key` from Aptabase, you can find it in the `Instructions` menu on the left side menu.
Initialize the SDK in your `Background Script` using your `App Key`:
```js
import { init } from '@aptabase/browser';
init('<YOUR_APP_KEY>'); // 👈 this is where you enter your App Key
The `init` function also supports an optional second parameter, which is an object with the `isDebug`property. Your data is segregated between development and production environments, so it's important to set this value correctly. By default the SDK will check if the extension was installed from an Extension Store, and if it wasn't it'll assume it's in development mode. If you want to override this behavior, you can set the`isDebug` property.