Announcement

Collapse
No announcement yet.

Google Analytic Universal installation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Google Analytic Universal installation

    Hi, I have tried installing the updated Universal Analytics tracking code, however it is not working correctly. I have placed the following code on the receipt page:

    Code:
    <script type="text/javascript"> 
    ga('ecommerce:addTransaction', { 
    'id': '<actinic:variable name="TheOrderNumber" />', // Transaction ID. Required. 
    'affiliation': 'Valucomputers', // Affiliation or store name. 
    'revenue': '<actinic:variable name="Total" />', // Grand Total. 
    'shipping': '<actinic:variable name="Shipping" />', // Shipping. 
    'tax': '<actinic:variable name="Tax1" />', // Tax. 
    'currency': 'GBP' // local currency code. 
    });
    
    ga('ecommerce:addItem', { 
    'id': '<actinic:variable name="TheOrderNumber" />', // Transaction ID. Required. 
    'name': '<actinic:variable name="ProdRef" />', // Product name. Required. 
    'price': '<actinic:variable name="Price" />', // Unit price. 
    'quantity': '<actinic:variable name="Quantity" />' // Quantity. 
    });
    
    ga('ecommerce:send'); 
    </script>
    GA is recording a "conversion" and the 'id' number is pulling through in the source code , but the other variables are not coming through when viewing the source code on the receipt page or in GA.

    What I am doing wrong here?

    Thanks,
    Chris
Working...
X