@funnelsgrove/analytics 0.1.102 → 0.1.104
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.
|
@@ -246,10 +246,12 @@ export class GoogleTagService {
|
|
|
246
246
|
}
|
|
247
247
|
ensureDataLayer() {
|
|
248
248
|
window.dataLayer = window.dataLayer || [];
|
|
249
|
-
window.gtag = window.gtag || (
|
|
249
|
+
window.gtag = window.gtag || function () {
|
|
250
250
|
var _a;
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
// gtag consumes Arguments commands; arrays are a different dataLayer API.
|
|
252
|
+
// eslint-disable-next-line prefer-rest-params
|
|
253
|
+
(_a = window.dataLayer) === null || _a === void 0 ? void 0 : _a.push(arguments);
|
|
254
|
+
};
|
|
253
255
|
}
|
|
254
256
|
installScript(src) {
|
|
255
257
|
var _a;
|
|
@@ -66,8 +66,7 @@ export const mapAnalyticsEventToMetaPixelEvent = (event) => {
|
|
|
66
66
|
eventId: event.eventId,
|
|
67
67
|
customData: buildCommerceCustomData(event.metadata),
|
|
68
68
|
};
|
|
69
|
-
case '
|
|
70
|
-
case 'payment_checkout_succeeded':
|
|
69
|
+
case 'add_payment_info':
|
|
71
70
|
return {
|
|
72
71
|
eventName: 'AddPaymentInfo',
|
|
73
72
|
eventId: event.eventId,
|
|
@@ -140,7 +140,7 @@ const buildFeatureFlagProperties = (featureFlags) => {
|
|
|
140
140
|
const META_SERVER_EVENT_TYPES = new Set([
|
|
141
141
|
'email_captured',
|
|
142
142
|
'checkout_started',
|
|
143
|
-
'
|
|
143
|
+
'add_payment_info',
|
|
144
144
|
]);
|
|
145
145
|
const buildEventMetadata = (eventType, metadata) => {
|
|
146
146
|
if (!META_SERVER_EVENT_TYPES.has(eventType)) {
|