@highfivve/ad-tag 5.8.13 → 5.8.14
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.
|
@@ -30,6 +30,22 @@ export const createUtiq = () => {
|
|
|
30
30
|
? { ...utiqWindow.Utiq, config: { ...utiqWindow.Utiq.config, ...config.options } }
|
|
31
31
|
: { queue: [], config: config.options };
|
|
32
32
|
utiqWindow.Utiq.queue = utiqWindow.Utiq.queue || [];
|
|
33
|
+
const emetriqSid = config.userIdConfig?.emetriq?.sid;
|
|
34
|
+
if (emetriqSid) {
|
|
35
|
+
utiqWindow.Utiq.queue.push(() => {
|
|
36
|
+
if (utiqWindow.Utiq?.API) {
|
|
37
|
+
utiqWindow.Utiq.API.addEventListener('onIdsAvailable', ({ mtid, category }) => {
|
|
38
|
+
if (!mtid || category !== 'mobile') {
|
|
39
|
+
context.logger__.info('Utiq', 'MTID missing or category is not mobile, fallback to standard code');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
context.logger__.debug('Utiq', 'MTID found and category is mobile, setting Emetriq params');
|
|
43
|
+
utiqWindow._enqAdpParam || (utiqWindow._enqAdpParam = {});
|
|
44
|
+
utiqWindow._enqAdpParam[`id_utiq_${emetriqSid}`] = mtid;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
33
49
|
if (context.tcData__.gdprApplies &&
|
|
34
50
|
requiredPurposeIds.some(purposeId => context.tcData__.gdprApplies && !context.tcData__.purpose.consents[purposeId])) {
|
|
35
51
|
return Promise.resolve();
|
package/lib/gen/packageJson.js
CHANGED