-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add button analytics #261
Add button analytics #261
Conversation
Changes look good! Another nit - but I think we do want a CHANGELOG entry here, it helps future us track which version we added these analytics in |
@@ -36,7 +46,9 @@ public class PaymentButton: UIButton { | |||
self.size = size | |||
self.insets = insets | |||
self.label = label | |||
self.analyticsService.sendEvent("paypal-button:initialized", buttonType: fundingSource.rawValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General question: do we want to send a specific event for each PaymentButton
subclass - so credit, pay later, paypal. Or are we sending the same event name for all buttons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its the same event name for all buttons but we also pass the buttonType
which would be one of PayPal
Pay Later
or Credit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 it certainly helps if I could read, sorry just totally missed the second half of this event. Take it or leave it, but is it worth considering payment-button
as the naming here? Wondering incase we add something like a Venmo button in the future would we reused this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vradopp what do you think about updating the events in this PR to "payment-button" vs "paypal-button"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me! Just updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 thanks for making that update!
do you mind pointing me where to look for existing tags? Not sure how to verify if |
I can help answer this! If you go to |
Reason for changes
Log payment button usage
Summary of changes
button_type
which is an existing tag to track the type of button usedpayment-button:tapped
andpayment-button:initialized
Checklist
- [ ] Added a changelog entryAuthors