Skip to content

Commit

Permalink
chore: minor change for eventsMapping
Browse files Browse the repository at this point in the history
  • Loading branch information
aanshi07 committed Aug 6, 2024
1 parent 148ac39 commit 6ae2a35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 6ae2a35

Please sign in to comment.