: Google Analytics: Ecommerce, set Source / Medium 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
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:
More posts by @Si4351233
1 Comments
Sorted by latest first Latest Oldest Best
As per your screenshot, this is how the source / medium is supposed to work. Source being the domain source the visitor came via and medium being the type of visit (referral, organic, cpc, direct etc)...
If you wish to see the exact page that led to the conversion, then you'd need to add a secondary dimension such as landing page which would then show the landing page they entered into your website on. If you wish to see everything they did from entrance to conversion, then set up goals and list each qualified step so that you can break down in analytics throughout your site's sales funnel.
About traffic sources.
You can set up custom campaigns to use custom URL tagging modifying the default source/medium but it's not the most practical method if you just want to know the previous page a visitor was on prior to converting on your site regardless of traffic source.
Hope that makes sense?
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.