[backport] Add extra ec methods to analytics service
parent
e35184bc0f
commit
bf145250b8
|
@ -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