An open API service indexing awesome lists of open source software.

https://github.com/airblockai/js-sdk

airblock javascript SDK
https://github.com/airblockai/js-sdk

analytics attribution events javascript sdk typescript web3

Last synced: about 1 month ago
JSON representation

airblock javascript SDK

Awesome Lists containing this project

README

          

# airblock js-sdk

airblock Javascript SDK collects and sends browser events to an event collector of your choice.

You'll need Node.js and a package manager like npm or yarn.

### Install SDK
Run `npm install --save @airblock/js-sdk` to install the SDK locally.

We have built-in typescript support so you do not need to install the types for the SDK.

### Initialize SDK
You must initialize the SDK before you collect any events.

To initialize, you must provide the `SERVER_URL` of your event collector and a string as `API_KEY` to identify your application.

```js
import * as airblock from "@airblock/js-sdk";

const API_KEY = "app1"; // required
const SERVER_URL = "https://..."; // required

airblock.init(API_KEY, SERVER_URL);
```

Once initialized, the SDK will start sending default events to your event collector.

## Support
For general help, read the [documentation](https://docs.airblock.ai), or go to [Github Discussions](https://github.com/airblockai/js-sdk/discussions).

To report a bug or request a feature, open an [issue](https://github.com/airblockai/js-sdk/issues).