From 9809c250ad6778a77c141f8b1627f867bfa111a9 Mon Sep 17 00:00:00 2001 From: Robert Ing Date: Fri, 4 Oct 2024 16:24:10 -0400 Subject: [PATCH] fix: Report purchase events to mParticle when bundling ecommerce data --- src/BrazeKit-dev.js | 2 ++ test/tests.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/BrazeKit-dev.js b/src/BrazeKit-dev.js index b4b0eb4..cdb753a 100644 --- a/src/BrazeKit-dev.js +++ b/src/BrazeKit-dev.js @@ -129,6 +129,8 @@ var constructor = function () { quantity, eventAttributes ); + + return reportEvent; } function logPurchaseEventPerProduct(event) { diff --git a/test/tests.js b/test/tests.js index 2098679..cfe82de 100644 --- a/test/tests.js +++ b/test/tests.js @@ -1756,6 +1756,7 @@ user.getUserIdentities is not a function,\n`; baz: 'bar', }; + debugger; mParticle.forwarder.process({ EventName: 'eCommerce - Purchase', EventDataType: MessageType.Commerce, @@ -1832,6 +1833,8 @@ user.getUserIdentities is not a function,\n`; var purchaseEventProperties = window.braze.purchaseEventProperties[0]; purchaseEventProperties.should.eql(expectedPurchaseEvent); + + reportService.event.should.be.ok(); }); it('should call changeUser and openSession on init with userIdentificationType MPID passed in forwarding settings', function() {