mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-29 14:19:48 -04:00
Update purchase tracking to work with GA goals
Need an integer value field.
This commit is contained in:
parent
ac7b573b06
commit
7e340fcd41
3 changed files with 3 additions and 3 deletions
app/views
|
@ -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) =>
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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(=>
|
||||
|
|
Loading…
Add table
Reference in a new issue