Skip to content

Commit

Permalink
fix: Report purchase events to mParticle when bundling ecommerce data (
Browse files Browse the repository at this point in the history
  • Loading branch information
rmi22186 authored Oct 8, 2024
1 parent f0cfe2e commit 333b7eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/BrazeKit-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ var constructor = function () {
quantity,
eventAttributes
);

return reportEvent === true;
}

function logPurchaseEventPerProduct(event) {
Expand Down
5 changes: 5 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,11 @@ user.getUserIdentities is not a function,\n`;
var purchaseEventProperties = window.braze.purchaseEventProperties[0];

purchaseEventProperties.should.eql(expectedPurchaseEvent);

reportService.event.should.have.property(
'EventName',
'eCommerce - Purchase'
);
});

it('should call changeUser and openSession on init with userIdentificationType MPID passed in forwarding settings', function() {
Expand Down

0 comments on commit 333b7eb

Please sign in to comment.