Add extra ec methods to analytics service
parent
5fa2400130
commit
9cf8f4e26f
|
@ -102,10 +102,30 @@ class AnalyticsService extends taiga.Service
|
|||
else if step == "plan-changed"
|
||||
stepId = 5
|
||||
|
||||
ga('ec:setAction','checkout', {
|
||||
@win.ga('ec:setAction','checkout', {
|
||||
'step': stepId,
|
||||
'Option': option
|
||||
})
|
||||
|
||||
addEcImpression: (plan, page, position) ->
|
||||
@win.ga('ec:addImpression', {
|
||||
'id': plan.plan_id,
|
||||
'name': plan.name,
|
||||
'list': page,
|
||||
'position': position,
|
||||
})
|
||||
|
||||
setEcAddProduct: (plan) ->
|
||||
@win.ga('ec:addProduct', {
|
||||
'id': plan.plan_id,
|
||||
'name': plan.name,
|
||||
'position': 1,
|
||||
})
|
||||
|
||||
setEcSetAction: (action, page) ->
|
||||
@win.ga('ec:setAction', action, {
|
||||
'list': page
|
||||
})
|
||||
|
||||
module.service("$tgAnalytics", AnalyticsService)
|
||||
|
||||
|
|
Loading…
Reference in New Issue