mod-build 4.0.76-beta.1 → 4.0.76-beta.2
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/package.json
CHANGED
|
@@ -7,7 +7,7 @@ export const useDynamicGtm = (config) => {
|
|
|
7
7
|
hasQsParams();
|
|
8
8
|
window.gtm_container_ID = window.isQSPage ? config.qs_gtm_container_ID : config.gtm_container_ID;
|
|
9
9
|
if (page.headConfig.updateMediaSpecificGtm) {
|
|
10
|
-
updateMediaSpecificGtm();
|
|
10
|
+
updateMediaSpecificGtm(page.headConfig.updateMediaSpecificGtm);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export default function () {
|
|
1
|
+
export default function (trafficChannels) {
|
|
2
|
+
// trafficChannels is an array of media channels to enable this feature, e.g. ['sem', 'avm'] - we are going to remove this param after testing
|
|
2
3
|
const gtmContainers = {
|
|
3
4
|
'sem': 'GTM-5WM2R5WC',
|
|
4
5
|
'avm': 'GTM-TBJV3H',
|
|
@@ -21,5 +22,7 @@ export default function () {
|
|
|
21
22
|
mediaChannel = 'sem';
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
if (trafficChannels.includes(mediaChannel) && gtmContainers[mediaChannel]) {
|
|
26
|
+
window.gtm_container_ID = gtmContainers[mediaChannel];
|
|
27
|
+
}
|
|
25
28
|
}
|