Skip to content

Commit 6a23337

Browse files
committed
chore: update dependencies and enhance web tracking support
1 parent bd56e18 commit 6a23337

File tree

7 files changed

+866
-2389
lines changed

7 files changed

+866
-2389
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ If you're targeting Android, you'll need to add the following permissions to you
2020
<uses-permission android:name="android.permission.INTERNET" />
2121
```
2222

23+
## Web Support
24+
25+
This SDK also supports React Native Web!
26+
27+
> [!NOTE]
28+
> This feature is disabled by default. To enable it, you need to pass the `enableWeb` option when initializing the SDK.
29+
30+
```js
31+
Aptabase.init("<YOUR_APP_KEY>", { enableWeb: true });
32+
```
33+
34+
When enabled, the SDK will track events in web environments using the same behavior as the web SDKs. Which means that events will be sent immediately to the `/event` endpoint instead of grouped to the `/events` endpoint.
35+
2336
## Usage
2437

2538
First, you need to get your `App Key` from Aptabase, you can find it in the `Instructions` menu on the left side menu.
@@ -64,7 +77,9 @@ export function Counter() {
6477
);
6578
}
6679
```
80+
6781
To disable tracking events, you can call the `dispose` function. This will stop and deinitalize the SDK.
82+
6883
```js
6984
import Aptabase from "@aptabase/react-native";
7085

0 commit comments

Comments
 (0)