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
- Host: GitHub
- URL: https://github.com/airblockai/js-sdk
- Owner: airblockai
- License: mit
- Created: 2023-04-15T10:42:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T16:09:54.000Z (almost 3 years ago)
- Last Synced: 2025-10-01T13:22:34.972Z (9 months ago)
- Topics: analytics, attribution, events, javascript, sdk, typescript, web3
- Language: JavaScript
- Homepage: https://docs.airblock.ai
- Size: 242 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).