Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track commerce activity via Button Merchant Library #8

Merged
merged 3 commits into from
Aug 20, 2020

Conversation

najmsheikh
Copy link

This PR hooks the ButtonKit into the CommerceListener to listen to commerce events. For the following supported event names, the respective ML activity method is called:

  • view_detail -> ButtonMerchant.activity().productViewed(~)
  • add_to_cart -> ButtonMerchant.activity().productAddedToCart(~)
  • checkout -> ButtonMerchant.activity().cartViewed(~)

It is important to note that these mappings are best-effort, since the consumer of the ButtonKit (an mParticle Partner) may design their system another way.

Additionally, tries to parse as much info from the mParticle Product into a ButtonProductCompatible which is used by the ML for activity reporting.

@najmsheikh najmsheikh self-assigned this Aug 19, 2020
@najmsheikh najmsheikh force-pushed the najm/track-commerce-activity branch 2 times, most recently from 5ccc799 to 7ebed80 Compare August 20, 2020 16:28
@najmsheikh najmsheikh force-pushed the najm/track-commerce-activity branch from 7ebed80 to e4a6338 Compare August 20, 2020 16:51
@najmsheikh najmsheikh force-pushed the najm/track-commerce-activity branch from e4a6338 to 432067a Compare August 20, 2020 18:20
@najmsheikh najmsheikh merged commit f67fc93 into master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants