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