Skip to content

Commit

Permalink
feat: add value property to non-search-related conversion events (#528)
Browse files Browse the repository at this point in the history
The [previous
change](#526) only
applied to 'after search' events
  • Loading branch information
jkaho authored Dec 11, 2023
1 parent 7fec2c3 commit e624693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/__tests__/conversion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ describe("addedToCartObjectIDsAfterSearch", () => {
quantity: 2
}
],
currency: "JPY"
currency: "JPY",
value: 79.96
};

it("should call sendEvents with proper params", () => {
Expand Down Expand Up @@ -221,7 +222,8 @@ describe("purchasedObjectIDs", () => {
quantity: 1
}
],
currency: "AUD"
currency: "AUD",
value: 100
};

it("should call sendEvents with proper params", () => {
Expand Down
1 change: 1 addition & 0 deletions lib/conversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export interface InsightsSearchConversionObjectIDsEvent {

objectIDs: string[];
objectData?: InsightsEvent["objectData"];
value?: InsightsEvent["value"];
currency?: InsightsEvent["currency"];
}

Expand Down

0 comments on commit e624693

Please sign in to comment.