GA - ecommerce tracking - ne radi

Juce sam testirao, menjao tu neke verzije, isprobavao i u jednom trenutku mi je bilo zabelezilo, sad ne mogu da provalim u kom obliku je bio kod. Negde postoji neki razlog zasto ne belezi. Ako neko uoci, ili ima predlog koda, neka napise, bio bih zahvalan.
Trenutno imam ovo, ali ne belezi:

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-xxxxx-1', 'auto');
  ga('send', 'pageview');
  ga('require', 'ecommerce', 'ecommerce.js');
  
  ga('ecommerce:addTransaction', {
id: '33', // Transaction ID - this is normally generated by your system.
affiliation: 'Prodavnica', // Affiliation or store name
revenue: '89.00', // Grand Total
shipping: '0' , // Shipping cost
tax: '5.99' }); // Tax.

ga('ecommerce:addItem', {
id: '33', // Transaction ID.
sku: 'LTAFD', // SKU/code.
name: 'Proizvod', // Product name.
category: 'Katka', // Category or variation.
price: '89.00', // Unit price.
quantity: '1'}); // Quantity.

ga('ecommerce:send');

`

Jesi li probao sa Tag Managerom?


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey