@opexa/portal-sdk 0.34.0 → 0.34.1

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.cjs CHANGED
@@ -4157,7 +4157,12 @@ var DomainManager = class {
4157
4157
  if (this.isIOSApp) return `ios/${this.platform}`.toLowerCase();
4158
4158
  if (this.isAndroidApp) return `android/${this.platform}`.toLowerCase();
4159
4159
  const url = new URL(window.location.href);
4160
- if (url.searchParams.has("m")) return `${url.hostname}/${url.searchParams.get("m")}`;
4160
+ const rootDomain = url.hostname;
4161
+ const mParam = url.searchParams.get("m");
4162
+ return mParam ? `${rootDomain}/${mParam}` : rootDomain;
4163
+ }
4164
+ get metaPixelId() {
4165
+ const url = new URL(window.location.href);
4161
4166
  const map = {
4162
4167
  "crazywin.ph": "587374767622209",
4163
4168
  "crazywin.asia": "587374767622209",
@@ -4166,8 +4171,8 @@ var DomainManager = class {
4166
4171
  "crazywinph.ph": "587374767622209"
4167
4172
  }
4168
4173
  };
4169
- const domain = map[url.hostname] ? map[url.hostname] : url.hostname;
4170
- return domain.toLowerCase();
4174
+ const metaPixelId = map[url.hostname] ? map[url.hostname] : url.hostname;
4175
+ return metaPixelId.toLowerCase();
4171
4176
  }
4172
4177
  get isServer() {
4173
4178
  return typeof window === "undefined";