From 6ae2a35837650485078f7e0c83d5674ddaf7738e Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Tue, 6 Aug 2024 14:14:42 +0530 Subject: [PATCH] chore: minor change for eventsMapping --- .../__tests__/integrations/XPixel/browser.test.js | 2 +- .../src/integrations/XPixel/browser.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/analytics-js-integrations/__tests__/integrations/XPixel/browser.test.js b/packages/analytics-js-integrations/__tests__/integrations/XPixel/browser.test.js index 5bbc4491a..413bca31b 100644 --- a/packages/analytics-js-integrations/__tests__/integrations/XPixel/browser.test.js +++ b/packages/analytics-js-integrations/__tests__/integrations/XPixel/browser.test.js @@ -10,7 +10,7 @@ const destinationInfo = { const basicConfig = { pixelId: '12567839', - eventToEventIdMap: [ + eventsMapping: [ { from: 'Sign Up', to: '123' }, { from: 'Custom', to: '987' }, { from: 'Page View', to: '456' }, diff --git a/packages/analytics-js-integrations/src/integrations/XPixel/browser.js b/packages/analytics-js-integrations/src/integrations/XPixel/browser.js index 59a06034b..0cc4cc178 100644 --- a/packages/analytics-js-integrations/src/integrations/XPixel/browser.js +++ b/packages/analytics-js-integrations/src/integrations/XPixel/browser.js @@ -16,7 +16,7 @@ class XPixel { } this.analytics = analytics; this.pixelId = config.pixelId; - this.eventToEventIdMap = config.eventToEventIdMap; + this.eventsMapping = config.eventsMapping; this.name = NAME; ({ shouldApplyDeviceModeTransformation: this.shouldApplyDeviceModeTransformation, @@ -44,14 +44,14 @@ class XPixel { return; } const properties = getTrackResponse(rudderElement.message); - const standardEventsMap = getHashFromArrayWithDuplicate(this.eventToEventIdMap); + const standardEventsMap = getHashFromArrayWithDuplicate(this.eventsMapping); sendEvent(event, properties, standardEventsMap); } page(rudderElement) { const event = 'Page View'; const properties = getTrackResponse(rudderElement.message); - const standardEventsMap = getHashFromArrayWithDuplicate(this.eventToEventIdMap); + const standardEventsMap = getHashFromArrayWithDuplicate(this.eventsMapping); sendEvent(event, properties, standardEventsMap); } }