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

Purchases: Add analytics to the purchase confirm cancellation submit button #480

Merged
merged 2 commits into from
Nov 24, 2015

Conversation

scruffian
Copy link
Member

Adds a calypso_purchases_submit_cancel_form event to the submit button form the cancel confirmation page.

Fixes #271 (part of it)

Testing

  1. git checkout add/analytics-submit-cancel-confirmation
  2. Open http://calypso.dev:3000/purchases
  3. Add calypso:analytics to the debugger so you see analytics calls in your console
  4. Open a purchase and go to the confirm cancel page
  5. Submit the cancel button
  6. Assert that you see this event: calypso_purchases_submit_cancel_form with the product_slug property
  • Code review
  • QA review

@scruffian scruffian added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Tracks Metrics & Monitoring Capturing analytics about user behavior on WordPress.com. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. labels Nov 23, 2015
@scruffian scruffian self-assigned this Nov 23, 2015
@scruffian scruffian added this to the Purchases: v1 milestone Nov 23, 2015
@scruffian scruffian mentioned this pull request Nov 23, 2015
13 tasks
@fabianapsimoes fabianapsimoes added [Status] Needs Author Reply [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs Author Reply labels Nov 23, 2015
@fabianapsimoes
Copy link
Contributor

QA 👍

@scruffian scruffian force-pushed the add/analytics-submit-cancel-confirmation branch from 0180940 to 529f254 Compare November 23, 2015 17:18
@@ -66,6 +67,12 @@ const ConfirmCancelPurchase = React.createClass( {
}

notices.success( response.message, { persistent: true } );

analytics.tracks.recordEvent(
'calypso_purchases_submit_cancel_form',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor, but I believe this should be calypso_purchases_cancel_form_submit per the analytics readme:

In order to keep similar events grouped together when output in an alphabetized list (as is typical with ananlytics tools), put the verb at the end of the event name

@drewblaisdell drewblaisdell force-pushed the add/analytics-submit-cancel-confirmation branch from 20c604e to 9bc5325 Compare November 23, 2015 23:24
@drewblaisdell
Copy link
Contributor

I updated your commit to use getPurchase instead of accessing this.props.selectedPurchase.data (this seems to be a pattern in components that use PurchasesMixin) and added a commit to rename the event name, placing the verb at the end. Feel free to squash that if you agree with the change.

LGTM.

@drewblaisdell drewblaisdell added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 23, 2015
@scruffian scruffian force-pushed the add/analytics-submit-cancel-confirmation branch from 9bc5325 to 9e7b532 Compare November 24, 2015 10:00
scruffian added a commit that referenced this pull request Nov 24, 2015
…onfirmation

Purchases: Add analytics to the purchase confirm cancellation submit button
@scruffian scruffian merged commit 6d6334b into master Nov 24, 2015
@scruffian scruffian deleted the add/analytics-submit-cancel-confirmation branch November 24, 2015 10:12
@scruffian scruffian removed their assignment Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. [Feature] Tracks Metrics & Monitoring Capturing analytics about user behavior on WordPress.com.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants