@advenue/react-native 0.5.0 → 0.6.0
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/dist/index.js +4 -0
- package/package.json +2 -2
- package/src/index.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -476,6 +476,7 @@ var Advenue = {
|
|
|
476
476
|
if (autoTrackInstall !== false) {
|
|
477
477
|
if (instance.getRequireConsent() && !instance.getTrackingConsent()) {
|
|
478
478
|
autoInstallPending = true;
|
|
479
|
+
instance.debugLog("install deferred until consent is granted");
|
|
479
480
|
} else {
|
|
480
481
|
fireAutoInstall();
|
|
481
482
|
}
|
|
@@ -556,6 +557,7 @@ async function trackInstall() {
|
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
559
|
if (sent) {
|
|
560
|
+
client.debugLog("install skipped (already sent on this device)");
|
|
559
561
|
return;
|
|
560
562
|
}
|
|
561
563
|
if (installInFlight) {
|
|
@@ -658,11 +660,13 @@ async function trackInstall() {
|
|
|
658
660
|
client.track("install", props, trackOpts);
|
|
659
661
|
if (client.pendingCount === pendingBefore) {
|
|
660
662
|
installInFlight = false;
|
|
663
|
+
client.debugLog("install dropped (consent revoked mid-flight)");
|
|
661
664
|
if (autoInstallEnabled && client.getRequireConsent() && !client.getTrackingConsent()) {
|
|
662
665
|
autoInstallPending = true;
|
|
663
666
|
}
|
|
664
667
|
return;
|
|
665
668
|
}
|
|
669
|
+
client.debugLog("install fired");
|
|
666
670
|
try {
|
|
667
671
|
installFlagStore?.setItem(INSTALL_SENT_KEY, "1");
|
|
668
672
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@advenue/react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Advenue MMP React Native SDK — attribution, install tracking, and deep links (bundled iOS/Android Expo native modules)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@advenue/install-referrer": "0.1.1",
|
|
30
|
-
"@advenue/sdk-core": "0.
|
|
30
|
+
"@advenue/sdk-core": "0.4.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@expo/config-plugins": ">=8",
|
package/src/index.ts
CHANGED
|
@@ -434,6 +434,7 @@ export const Advenue = {
|
|
|
434
434
|
// Consent gate is closed — defer to the consent-granting paths so the
|
|
435
435
|
// install is neither dropped nor fired pre-consent.
|
|
436
436
|
autoInstallPending = true;
|
|
437
|
+
instance.debugLog('install deferred until consent is granted');
|
|
437
438
|
} else {
|
|
438
439
|
// Fire-and-forget: referrer/attestation resolution must not delay init.
|
|
439
440
|
fireAutoInstall();
|
|
@@ -545,6 +546,7 @@ export async function trackInstall(): Promise<void> {
|
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
548
|
if (sent) {
|
|
549
|
+
client.debugLog('install skipped (already sent on this device)');
|
|
548
550
|
return; // already counted this device (durable flag from a prior launch)
|
|
549
551
|
}
|
|
550
552
|
// C7: same-process dedup guard. If another trackInstall() call is already
|
|
@@ -725,11 +727,13 @@ export async function trackInstall(): Promise<void> {
|
|
|
725
727
|
// the drop was the consent gate closing (not erasure) so a later grant
|
|
726
728
|
// re-fires without waiting for the next launch.
|
|
727
729
|
installInFlight = false;
|
|
730
|
+
client.debugLog('install dropped (consent revoked mid-flight)');
|
|
728
731
|
if (autoInstallEnabled && client.getRequireConsent() && !client.getTrackingConsent()) {
|
|
729
732
|
autoInstallPending = true;
|
|
730
733
|
}
|
|
731
734
|
return;
|
|
732
735
|
}
|
|
736
|
+
client.debugLog('install fired');
|
|
733
737
|
// Write durable flags AFTER the install event is successfully enqueued. If
|
|
734
738
|
// the process crashes between here and the flag write, the next launch will
|
|
735
739
|
// re-fire the install — the backend per-device dedup window absorbs the
|