@opexa/portal-sdk 0.59.136 → 0.59.137
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 +1762 -1762
- package/dist/{chunk-ZBLHFIBW.js → chunk-7Y7FWND5.js} +3 -3
- package/dist/chunk-7Y7FWND5.js.map +1 -0
- package/dist/{chunk-77N5VUZS.js → chunk-BTV72WJH.js} +2 -2
- package/dist/chunk-BTV72WJH.js.map +1 -0
- package/dist/{chunk-WR5RNSY2.js → chunk-Q5CO6LH3.js} +3 -3
- package/dist/chunk-Q5CO6LH3.js.map +1 -0
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-77N5VUZS.js.map +0 -1
- package/dist/chunk-WR5RNSY2.js.map +0 -1
- package/dist/chunk-ZBLHFIBW.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint, isIOSPlatform } from './chunk-
|
|
2
|
-
import { GraphQLClient, isPlainObject } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint, isIOSPlatform } from './chunk-Q5CO6LH3.js';
|
|
2
|
+
import { GraphQLClient, isPlainObject } from './chunk-7Y7FWND5.js';
|
|
3
|
+
import './chunk-BTV72WJH.js';
|
|
4
4
|
import { ObjectId } from '@opexa/object-id';
|
|
5
5
|
export { ObjectId } from '@opexa/object-id';
|
|
6
6
|
import { Capacitor } from '@capacitor/core';
|
|
@@ -3850,6 +3850,13 @@ var Sdk = class {
|
|
|
3850
3850
|
const searchParams = new URLSearchParams(window.location.search);
|
|
3851
3851
|
const hostname = window.location.hostname;
|
|
3852
3852
|
const market = searchParams.get("market");
|
|
3853
|
+
const utmSource = searchParams.get("utm_source");
|
|
3854
|
+
const utmMedium = searchParams.get("utm_medium");
|
|
3855
|
+
const utmCampaign = searchParams.get("utm_campaign");
|
|
3856
|
+
const utmContent = searchParams.get("utm_content");
|
|
3857
|
+
const utmValues = [utmSource, utmMedium, utmCampaign, utmContent].filter(
|
|
3858
|
+
(value) => Boolean(value)
|
|
3859
|
+
);
|
|
3853
3860
|
const adClickId = this.adManager.clickId;
|
|
3854
3861
|
if (Capacitor.isNativePlatform()) {
|
|
3855
3862
|
const platform = Capacitor.getPlatform();
|
|
@@ -3861,12 +3868,12 @@ var Sdk = class {
|
|
|
3861
3868
|
return;
|
|
3862
3869
|
}
|
|
3863
3870
|
const currentDomain = sessionStorage.getItem("domain");
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
sessionStorage.setItem("domain",
|
|
3871
|
+
const marketDomain = market ? `${hostname}/${market}` : null;
|
|
3872
|
+
const utmDomain = utmValues.length ? `${hostname}/${utmValues.join("-")}` : null;
|
|
3873
|
+
const fallbackDomain = currentDomain ? null : adClickId ? `${hostname}/meta-ads` : hostname;
|
|
3874
|
+
const nextDomain = marketDomain ?? utmDomain ?? fallbackDomain;
|
|
3875
|
+
if (nextDomain) {
|
|
3876
|
+
sessionStorage.setItem("domain", nextDomain);
|
|
3870
3877
|
}
|
|
3871
3878
|
if (market) {
|
|
3872
3879
|
setTimeout(() => {
|