sebasimone Posted December 5, 2017 Share Posted December 5, 2017 Hi all! I've got a bit of a problem trying to implement GA over GTM. So far I'm able to push the transaction data using a datalayer in order-confirmation.tpl, and it works just nice. I even added a custom dimension for tracking the order shipping carrier, which is not tracked automatically. But I wanted to send each bought product's category along with all the info and I'm unable to do so. I thought I would be able to see products category in the sales performance report (selecting the 'product category dimension') but it seems empty. This is an extract from the google analytics debug tool: Sent beacon: v=1&_v=j66d&a=889969734&t=item&_s=3&dl=https%3A%2F%2Fwww.axis.com.ar%2Fconfirmacion-pedido%3Fkey%3Dfc61c764bbc61c9a5895cb1f069722ad%26id_cart%3D8867%26id_module%3D101%26id_order%3D4661&ul=es-419&de=UTF-8&dt=Confirmaci%C3%B3n%20de%20pedido%20-%20Axis%20DIY%20%26%20Music%20Store&sd=24-bit&sr=1920x1080&vp=1905x624&je=0&fl=27.0%20r0&_u=SCCAAEAb~&jid=&gjid=&cid=717073734.1512071240&uid=1201&tid=UA-45161978-1&_gid=1293350739.1512071240>m=GbePTN998K&cd2=Retiro%20en%20Almagro&ti=4661&ic=271&in=Capacitores%20Nichicon%20de%20Alta%20tensi%C3%B3n&iv=capacitores&ip=65&iq=1&z=1987578778 analytics_debug.js:10 <unknown> (>m) GbePTN998K analytics_debug.js:10 _j1 (&jid) analytics_debug.js:10 _j2 (&gjid) analytics_debug.js:10 adSenseId (&a) 889969734 analytics_debug.js:10 apiVersion (&v) 1 analytics_debug.js:10 clientId (&cid) 717073734.1512071240 analytics_debug.js:10 dimension2 (&cd2) Retiro en Almagro analytics_debug.js:10 ec:id (&ti) 4661 analytics_debug.js:10 ec:item code (&ic) 271 analytics_debug.js:10 ec:item name (&in) Capacitores Nichicon de Alta tensión analytics_debug.js:10 ec:item price (&ip) 65 analytics_debug.js:10 ec:item quantity (&iq) 1 analytics_debug.js:10 ec:item variation (&iv) capacitores analytics_debug.js:10 encoding (&de) UTF-8 as you can see there is a line for 'item variation' that has the product category, but it doesn't seem to be reflected on GA Frontend. I have of course activated the use of the enhanced ecommerce option in Google Tag Manager, and I've instructed it to use the datalayer, which i'm pasting below. {literal} <script type="text/javascript"> window.dataLayer = window.dataLayer || []; dataLayer.push({ 'transactionId': '{/literal}{$id_pedido}{literal}', 'shipping_carrier': {/literal}{$shipping_carrier}{literal}, 'transactionTotal': {/literal}{$total_a_pagar}{literal}, 'transactionTax': {/literal}{$impuestos}{literal}, 'transactionShipping': {/literal}{$gastos_envio}{literal}, 'transactionProducts': [{/literal}{foreach from=$productos item=producto name=productos}{literal} { 'sku': '{/literal}{$producto.id_product}{literal}', 'category': '{/literal}{$producto.category}{literal}', 'name': '{/literal}{$producto.name}{literal}', 'price': {/literal}{$producto.price_wt}{literal}, 'quantity': {/literal}{$producto.quantity}{literal} }{/literal}{if $smarty.foreach.productos.iteration != $productos|@count}{literal},{/literal}{/if}{literal} {/literal}{/foreach}],{literal} 'event': 'transactionComplete' }) </script> {/literal} Hope someone can help me. Regards! Link to comment Share on other sites More sharing options...
sebasimone Posted December 6, 2017 Author Share Posted December 6, 2017 plz anyone? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now