arky-sdk 0.7.32 → 0.7.34

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
@@ -2237,12 +2237,10 @@ async function createArkySDK(config) {
2237
2237
  const businessApi = createBusinessApi(apiConfig);
2238
2238
  const platformApi = createPlatformApi(apiConfig);
2239
2239
  if (typeof window !== "undefined" && apiConfig.businessId) {
2240
- businessApi.getIntegrationConfig({ businessId: apiConfig.businessId, type: "analytics" }).then((configs) => {
2241
- if (!configs) return;
2242
- for (const c of Array.isArray(configs) ? configs : [configs]) {
2243
- if (c.measurementId) {
2244
- injectGA4Script(c.measurementId);
2245
- }
2240
+ businessApi.getBusiness({}).then((business) => {
2241
+ const measurementId = business?.configs?.analytics?.measurementId;
2242
+ if (measurementId) {
2243
+ injectGA4Script(measurementId);
2246
2244
  }
2247
2245
  }).catch(() => {
2248
2246
  });