I added standard Google E-commerce code to my page. Everything works fine, just the Source/Medium
value is just always my domain. How do I get the normal source, or set it?
In short, how do I get a reference to where people came to shop from?
Test script:
<script>
(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-XXXXXXX-1', 'my-page.com');
ga('send', 'pageview');
</script>
<script>
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': '111, // Transaction ID. Required.
'affiliation': 'Affiliation name', // Affiliation or store name.
'revenue': '3.29', // Grand Total.
'shipping': '1', // Shipping.
'tax': '3.11' // Tax.
});
ga('ecommerce:addItem', {
'id': '111', // Transaction ID. Required.
'name': 'Prod1', // Product name. Required.
'sku': 'SKU00011', // SKU/code.
'category': 'Prod category', // Category or variation.
'price': '155.21', // Unit price.
'quantity': '1' // Quantity.
});
ga('ecommerce:send');
ga('ecommerce:clear');
</script>
What i need get: