Closed cfgv closed 6 years ago
Hi @cfgv, for google analytics this should help you: https://github.com/railslove/rack-tracker#ecommerce or look at the code: https://github.com/railslove/rack-tracker/blob/master/lib/rack/tracker/google_analytics/template/google_analytics.erb
but this issue tracker is not a support forum.
How set
action_type
option?For example I need set
purchase
option:ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject. 'id': 'T12345', // (Required) Transaction id (string). 'affiliation': 'Google Store - Online', // Affiliation (string). 'revenue': '37.39', // Revenue (currency). 'tax': '2.85', // Tax (currency). 'shipping': '5.34', // Shipping (currency). 'coupon': 'SUMMER2013' // Transaction coupon (string). });
Were you able to find a way?
@JCEsmeraldo I did it this way
t.google_analytics :enhanced_ecommerce, {
type: 'setAction',
label: 'purchase',
id: @reservation.id,
revenue: @reservation.total,
coupon: @reservation.coupon
}
How set
action_type
option?For example I need set
purchase
option: