[backport] tracking checkout and add-to-cart as ecommerce events

stable
Jesús Espino 2017-12-11 18:27:57 +01:00
parent ffeeeeb501
commit 7c488743a7
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ class AnalyticsService extends taiga.Service
'position': 1, 'position': 1,
}) })
@win.ga('ec:setAction','add') @win.ga('ec:setAction','add')
@win.ga('send', 'event', 'add-to-cart', 'Collect Payment Info') @.trackEvent('ecommerce', 'add-to-cart', 'Collect Payment Info', null)
ecConfirmChange: (plan_id, plan_name, plan_price) -> ecConfirmChange: (plan_id, plan_name, plan_price) ->
return if not @.initialized return if not @.initialized
@ -192,6 +192,6 @@ class AnalyticsService extends taiga.Service
'id': plan_id, 'id': plan_id,
'revenue': plan_price, 'revenue': plan_price,
}) })
@win.ga('send', 'event', 'checkout', 'Plan checkout') @.trackEvent('ecommerce', 'checkout', 'Plan checkout', null)
module.service("$tgAnalytics", AnalyticsService) module.service("$tgAnalytics", AnalyticsService)