JavaScript E-commerce tracking with google tag manager ecommerce tracking with google tag manager,ecommerce tracking with google

I would like to start tracking e-commerce with Google Analytics, to do this I need to pass the values of my data layer into GA using GTM. I have read endless amounts of documentation on the subject and as far as I can tell it should work, however I am still having problems.

My data layer looks something like this on the checkout page of the site

dataLayer = [  
   {  
      'u12':'16149227',
      'ord':'31915976',
      'u3':'XXTX',
      'u7':'190.43',
      'cost':'190.43',
      'revenue':'190.43',
      'name':'XXTX',
      'category':'Annual',
      'id':'31915976'
   }
];

I have set up a trigger in GTM so the following tag only fires on the checkout page of my site.

The tag I have created in GTM is as follows:

    <script>

  ga('require', 'ecommerce', 'ecommerce.js');

  ga('ecommerce:addTransaction', {
    'id' : '{{id}}',
    'revenue': '{{revenue}}'
  });

  ga('ecommerce:addItem', {
    'id' : '{{id}}',
    'sku' : '{{u12}}',
    'name' : '{{name}}',
    'category' : '{{category}}', // Payment Method
    'price' : '{{cost}}', 
    'quantity' : '1'
  }); 

  ga('ecommerce:send');

</script>

Unfortunately this is not working and my Google Analytics is empty in terms of e-commerce transactions, any help on this would be greatly appreciated.

Answer:1

Take this code for example; it is a Redux reducer function: export default (state = initialState, action) => { switch (action.type) { case EMPLOYEE_UPDATE: { ...

Take this code for example; it is a Redux reducer function: export default (state = initialState, action) => { switch (action.type) { case EMPLOYEE_UPDATE: { ...

  1. does depression cause memory loss
  2. does gabapentin cause memory loss
  3. does anxiety cause memory loss
  4. does stress cause memory loss
  5. does metformin cause memory loss
  6. does xanax cause memory loss
  7. does ambien cause memory loss
  8. does alcohol cause memory loss
  9. does wellbutrin cause memory loss
  10. does anesthesia cause memory loss
  11. does lexapro cause memory loss
  12. does menopause cause memory loss
  13. does diabetes cause memory loss
  14. does ptsd cause memory loss
  15. does ms cause memory loss
  16. does omeprazole cause memory loss
  17. does zoloft cause memory loss
  18. does trazodone cause memory loss
  19. does lamictal cause memory loss
  20. does benadryl cause memory loss

I'm trying to implement a simple promise class with chainable .then() functionality in javascript. Here's what I've done till now - class APromise { constructor(Fn) { this.value = null; ...

I'm trying to implement a simple promise class with chainable .then() functionality in javascript. Here's what I've done till now - class APromise { constructor(Fn) { this.value = null; ...

I regularly visit a website with a lot of links of the following format: <a href="SomeURL" title="SomeTitle" id="SomeID">SomeText</a> Sadly the part SomeText is useless in most cases and ...

I regularly visit a website with a lot of links of the following format: <a href="SomeURL" title="SomeTitle" id="SomeID">SomeText</a> Sadly the part SomeText is useless in most cases and ...

  1. javascript replace link text
  2. javascript change link text

Currently in Ramda if I want to deep merge (right) multiple objects I.... var a = _.mergeDeepRight( { one: 1 }, { two: { three: 3 } } ) var b = _.mergeDeepRight( a, { three: { four: 4 } } ) var c = _....

Currently in Ramda if I want to deep merge (right) multiple objects I.... var a = _.mergeDeepRight( { one: 1 }, { two: { three: 3 } } ) var b = _.mergeDeepRight( a, { three: { four: 4 } } ) var c = _....