[backport] sending events for each ecommerce action
parent
a6fd467c18
commit
dd34b13821
|
@ -106,6 +106,7 @@ class AnalyticsService extends taiga.Service
|
||||||
'step': stepId,
|
'step': stepId,
|
||||||
'Option': option
|
'Option': option
|
||||||
})
|
})
|
||||||
|
@.trackEvent("ecommerce", "add-step", step, stepId)
|
||||||
|
|
||||||
addEcImpression: (plan, page, position) ->
|
addEcImpression: (plan, page, position) ->
|
||||||
@win.ga('ec:addImpression', {
|
@win.ga('ec:addImpression', {
|
||||||
|
@ -114,6 +115,7 @@ class AnalyticsService extends taiga.Service
|
||||||
'list': page,
|
'list': page,
|
||||||
'position': position,
|
'position': position,
|
||||||
})
|
})
|
||||||
|
@.trackEvent("ecommerce", "add-impression", plan.name, plan.plan_id)
|
||||||
|
|
||||||
addEcProduct: (plan) ->
|
addEcProduct: (plan) ->
|
||||||
@win.ga('ec:addProduct', {
|
@win.ga('ec:addProduct', {
|
||||||
|
@ -121,11 +123,12 @@ class AnalyticsService extends taiga.Service
|
||||||
'name': plan.name,
|
'name': plan.name,
|
||||||
'position': 1,
|
'position': 1,
|
||||||
})
|
})
|
||||||
|
@.trackEvent("ecommerce", "add-product", plan.name, plan.plan_id)
|
||||||
|
|
||||||
setEcAction: (action, page) ->
|
setEcAction: (action, page) ->
|
||||||
@win.ga('ec:setAction', action, {
|
@win.ga('ec:setAction', action, {
|
||||||
'list': page
|
'list': page
|
||||||
})
|
})
|
||||||
|
@.trackEvent("ecommerce", "set-action", action, page)
|
||||||
|
|
||||||
module.service("$tgAnalytics", AnalyticsService)
|
module.service("$tgAnalytics", AnalyticsService)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue