mparticle-integrations / mparticle-javascript-integration-appboy

⛔️ DEPRECATED - Appboy integration for the mParticle Web SDK
0 stars 6 forks source link

Bugfix - Refactor reportEvent #15

Closed rmi22186 closed 5 years ago

rmi22186 commented 5 years ago

mParticle expects a single forwarded event per mParticle event. Sometimes a kit expands a single event into several (eCommerce), which modifies the event name and affects forwarding stats in the mParticle UI. This PR resolves this to only send one forwarding event per mParticle event, regardless of if the event is expanded and multiple events are sent to AppBoy.

rmi22186 commented 5 years ago

i think it makes more sense to force a true/false when logPurchaseEvent or logAppboyEvent is called, so I did return reportEvent === true to account for any non true booleans

rmi22186 commented 5 years ago

good to go