@blotoutio/edgetag-sdk-browser 0.24.0 → 0.24.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/index.js +10 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
referrer: getReferrer(),
|
|
514
514
|
search: getSearch(),
|
|
515
515
|
locale: getLocale(),
|
|
516
|
-
sdkVersion: "0.24.
|
|
516
|
+
sdkVersion: "0.24.1" ,
|
|
517
517
|
...(payload || {}),
|
|
518
518
|
};
|
|
519
519
|
let storage = {};
|
|
@@ -583,12 +583,10 @@
|
|
|
583
583
|
|
|
584
584
|
const manifestVariables = {};
|
|
585
585
|
const addProviderVariable = (name, variables, tagName) => {
|
|
586
|
-
|
|
587
|
-
manifestVariables[name]
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
};
|
|
591
|
-
}
|
|
586
|
+
manifestVariables[name] = {
|
|
587
|
+
...manifestVariables[name],
|
|
588
|
+
[tagName]: variables || {},
|
|
589
|
+
};
|
|
592
590
|
};
|
|
593
591
|
const getProviderVariables = (name) => {
|
|
594
592
|
if (!name) {
|
|
@@ -666,20 +664,18 @@
|
|
|
666
664
|
return;
|
|
667
665
|
}
|
|
668
666
|
const variables = getProviderVariables(pkg.name);
|
|
669
|
-
const result =
|
|
670
|
-
for (const variableSet of Object.
|
|
671
|
-
result
|
|
667
|
+
const result = {};
|
|
668
|
+
for (const [tagName, variableSet] of Object.entries(variables)) {
|
|
669
|
+
result[tagName] = pkg.tag({
|
|
672
670
|
userId,
|
|
673
671
|
eventName,
|
|
674
672
|
eventId,
|
|
675
673
|
data: JSON.parse(JSON.stringify(data)),
|
|
676
674
|
sendTag,
|
|
677
675
|
manifestVariables: variableSet,
|
|
678
|
-
})
|
|
679
|
-
}
|
|
680
|
-
if (result.length) {
|
|
681
|
-
providerData[pkg.name] = result;
|
|
676
|
+
});
|
|
682
677
|
}
|
|
678
|
+
providerData[pkg.name] = result;
|
|
683
679
|
});
|
|
684
680
|
}
|
|
685
681
|
sendTag({
|