@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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint, isIOSPlatform } from './chunk-WR5RNSY2.js';
2
- import { GraphQLClient, isPlainObject } from './chunk-ZBLHFIBW.js';
3
- import './chunk-77N5VUZS.js';
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
- if (market) {
3865
- sessionStorage.setItem("domain", `${hostname}/${market}`);
3866
- } else if (adClickId && !currentDomain) {
3867
- sessionStorage.setItem("domain", `${hostname}/meta-ads`);
3868
- } else if (!currentDomain) {
3869
- sessionStorage.setItem("domain", hostname);
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(() => {