Mobile app version of vmapp.org
Login or Join
Si4351233

: 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

@Si4351233

Posted in: #Ecommerce #GoogleAnalytics

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:

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

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?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme