Skip to content

Commit

Permalink
fix: purchsse events for reddit
Browse files Browse the repository at this point in the history
  • Loading branch information
yashasvibajpai committed Jan 30, 2024
1 parent 5ad55a2 commit 1c40642
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/reddit/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
const event_type = (eventNames.length === 0 || eventNames[0]==="") ? ({"tracking_type": "Custom", "custom_event_name": event}): ({tracking_type: eventNames[0]});
- name: customFields
condition: $.outputs.eventType.tracking_type === "Purchase"
condition: $.outputs.prepareTrackPayload.eventType.tracking_type === "Purchase"
template: |
const customFields = .message.().({
"currency": .properties.currency,
Expand Down
5 changes: 4 additions & 1 deletion test/integrations/destinations/reddit/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ export const data = [
screen_dimensions: {},
},
event_metadata: {
item_count: 3,
item_count: 2,
currency: 'USD',
value: 15,
value_decimal: 0.15,
products: [
{
id: '123',
Expand Down
5 changes: 4 additions & 1 deletion test/integrations/destinations/reddit/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ export const data = [
screen_dimensions: {},
},
event_metadata: {
item_count: 3,
item_count: 2,
currency: 'USD',
value: 15,
value_decimal: 0.15,
products: [
{ id: '123', name: 'Monopoly', category: 'Games' },
{ id: '345', name: 'UNO', category: 'Games' },
Expand Down

0 comments on commit 1c40642

Please sign in to comment.