@traqio/react-native 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -148,6 +148,14 @@ Traqio.init({ sdkKey: "SDK_KEY", endpoint: "https://api.traqio.app", collectAdve
148
148
  - **Android**: add `com.google.android.gms:play-services-ads-identifier` and the
149
149
  `com.google.android.gms.permission.AD_ID` permission; nothing is sent when the user
150
150
  limited ad tracking.
151
+ - **Your app asks for consent after the first launch** (GDPR CMP, ATT after onboarding)?
152
+ Start with `waitForAdvertisingIdConsent: true` and report the answer — the id is not read
153
+ before it, and the install's Meta / TikTok postback waits up to one hour for it:
154
+
155
+ ```ts
156
+ Traqio.init({ sdkKey: "SDK_KEY", endpoint: "https://api.traqio.app", waitForAdvertisingIdConsent: true });
157
+ await Traqio.setAdvertisingIdConsent(userAgreed); // after your CMP / ATT prompt
158
+ ```
151
159
 
152
160
  It goes with the install, or once later when ATT is granted after the first launch. Traqio
153
161
  matches it hashed against tracked clicks, keeps it on that install, and sends it to Meta
@@ -190,6 +198,24 @@ Traffic from development builds is flagged as debug traffic. The SDK turns it on
190
198
 
191
199
  Debug traffic shows in the console's **Live events › Debug** view, but it is never counted in a report, attributed, sent to an ad network or a webhook, or billed.
192
200
 
201
+ ## Wrong or revoked key
202
+
203
+ A 401 / 403 from the API (unknown, wrong or revoked `sdkKey`) is not silent: the SDK
204
+ logs one `console.warn` and calls `onError` once — not on every retry, and again only
205
+ after a request has gone through. The events are kept and retried with exponential
206
+ backoff (up to 5 min), so fixing the key in the console delivers them.
207
+
208
+ ```ts
209
+ Traqio.init({
210
+ sdkKey,
211
+ endpoint,
212
+ onError: (e) => {
213
+ // e = { code: "invalid_sdk_key", status: 401 | 403, message }
214
+ myLogger.error(e.message);
215
+ },
216
+ });
217
+ ```
218
+
193
219
  ## Requirements
194
220
 
195
221
  - React Native 0.74+, with Expo Modules installed.
@@ -6,7 +6,7 @@ apply plugin: 'kotlin-android'
6
6
  apply plugin: 'maven-publish'
7
7
 
8
8
  group = 'io.khufu.traqio'
9
- version = '0.3.0'
9
+ version = '0.3.2'
10
10
 
11
11
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
12
12
  apply from: expoModulesCorePlugin
@@ -28,7 +28,7 @@ android {
28
28
  defaultConfig {
29
29
  minSdk safeExtGet("minSdkVersion", 24)
30
30
  versionCode 1
31
- versionName "0.3.0"
31
+ versionName "0.3.2"
32
32
  }
33
33
 
34
34
  compileOptions {
@@ -1,5 +1,11 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
- <!-- No permission needed: the Play Install Referrer API is bound via the Play Store app.
2
+ <!-- The SDK talks to the Traqio API, so it declares the one permission that needs
3
+ (todo cmx8om72m00lc): a blank Android Studio app has no INTERNET permission, and
4
+ Flutter's template grants it to debug builds only — such an app installed the SDK
5
+ from the docs, compiled, ran and sent nothing, silently. Merged into the host's
6
+ manifest; a normal permission, no prompt. -->
7
+ <uses-permission android:name="android.permission.INTERNET" />
8
+ <!-- No other permission: the Play Install Referrer API is bound via the Play Store app.
3
9
  The <queries> block IS needed on Android 11+ — package-visibility filtering hides
4
10
  com.android.vending from apps Play did not install itself (sideloads, dev builds,
5
11
  `adb install`), and the referrer read then fails with FEATURE_NOT_SUPPORTED. -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@traqio/react-native",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Traqio SDK for React Native / Expo — deterministic install attribution (Play Install Referrer) + SKAN. No IDFA, no fingerprinting.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -44,7 +44,7 @@
44
44
  "README.md"
45
45
  ],
46
46
  "dependencies": {
47
- "@traqio/core": "0.10.0"
47
+ "@traqio/core": "0.12.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@react-native-async-storage/async-storage": ">=1.21.0",