Skip to content

Commit

Permalink
Purchases: Add a submit event to tracks when the user saves their cre…
Browse files Browse the repository at this point in the history
…dit card details
  • Loading branch information
scruffian authored and drewblaisdell committed Nov 24, 2015
1 parent f102e28 commit c32a39c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/me/purchases/payment/edit-card-details/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import page from 'page';
/**
* Internal Dependencies
*/
import analytics from 'analytics';
import camelCase from 'lodash/string/camelCase';
import Card from 'components/card';
import CompactCard from 'components/card/compact';
Expand Down Expand Up @@ -118,6 +119,11 @@ const EditCardDetails = React.createClass( {
updateCreditCard() {
const cardDetails = this.getCardDetails();

analytics.tracks.recordEvent(
'calypso_purchases_credit_card_form_submit',
{ product_slug: this.getPurchase().productSlug }
);

createPaygateToken( cardDetails, ( paygateError, token ) => {
if ( paygateError ) {
notices.error( paygateError.message );
Expand Down

0 comments on commit c32a39c

Please sign in to comment.