问题
Is there even support for Ecommerce in the DTM implementation of Google UA? I'm not seeing a way to tell it to load the ecommerce library, let alone a way to include ecommerce related tags in your rules. There isn't even a "custom page code" option on the Rules with GUA like I have with Site Catalyst so not sure how to even add them manually. Am I missing something obvious? Or is there a work-around to doing the ecommerce tagging in DTM?
回答1:
DTM do not support ecommerce tracking nativly as other Tag Management System do (TealiumIQ for example).
To include ecommerce or advanced ecommerce library you have to setup the require in the GA tool pageCode. Something like:
ga('dtm_ga_standard.require', 'ec');
To use it you have to create custom third party tag in the correct pageLoad rule in order to setup advanced ecommerce tracking, something like:
ga('dtm_ga_standard.ec:setAction', 'purchase', {
id: s_orderid,
affiliation: s_orderid,
revenue: order_total,
tax: '0',
shipping: pageViewData.shipment_cost,
coupon: ''
});
ga('dtm_ga_standard.send', 'pageview');
Be sure to prevent in the tool custom page code the standard page view using the commend:
return false
When the ecommerce page load rule is running.
Claudio.
来源:https://stackoverflow.com/questions/33351024/google-analytics-enhanced-ecommerce-in-adobe-dtm