Update purchase tracking to work with GA goals

Need an integer value field.
This commit is contained in:
Matt Lott 2015-03-24 15:02:57 -07:00
parent ac7b573b06
commit 7e340fcd41
3 changed files with 3 additions and 3 deletions

View file

@ -123,7 +123,7 @@ class PersonalSub
me.set('stripe', stripeInfo)
me.once 'sync', =>
application.tracker?.trackEvent 'Finished subscription purchase', revenue: 0
application.tracker?.trackEvent 'Finished subscription purchase', value: 0
delete @prepaidCode
@update(render)
me.once 'error', (user, response, options) =>

View file

@ -144,7 +144,7 @@ module.exports = class SubscribeModal extends ModalView
me.patch({headers: {'X-Change-Plan': 'true'}})
onSubscriptionSuccess: ->
application.tracker?.trackEvent 'Finished subscription purchase', revenue: @purchasedAmount / 100
application.tracker?.trackEvent 'Finished subscription purchase', value: @purchasedAmount
Backbone.Mediator.publish 'subscribe-modal:subscribed', {}
@playSound 'victory'
@hide()

View file

@ -89,7 +89,7 @@ module.exports = class BuyGemsModal extends ModalView
jqxhr.done(=>
application.tracker?.trackEvent 'Finished gem purchase',
productID: @productBeingPurchased.id
revenue: @productBeingPurchased.amount / 100
value: @productBeingPurchased.amount
document.location.reload()
)
jqxhr.fail(=>