• Resolved awiggz20

    (@awiggz20)


    Hi guys,

    An advertising agency needs some help with tracking their efforts. They need to be able to pull out certain variables from the data layer, such as: Order ID, Revenue, Product Name, Product Id, ect.

    Is there a way I can find out this information?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    I believe what you are looking for is available in the Pro version of the plugin, not in the free version. A comparison of the two can be found here:

    https://docs.woocommerce.com/document/woocommerce-google-analytics-pro-vs-free/

    Thread Starter awiggz20

    (@awiggz20)

    Well i’m confused, how does this plugin pull out product information and populate it in GA when a transaction occurs. Wouldn’t it be something similar to this?

    ga('ec:setAction', 'purchase', {          
     actionFieldObject.
      'id': 'T12345',                         
      'affiliation': 'Google Store - Online', 
      'revenue': '37.39',                     
      'tax': '2.85',                          
      'shipping': '5.34',                 
      'coupon': 'SUMMER2013'                 
    });
    Plugin Support jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    I just did a transaction on my site and this is the data that was included:

    
    		<script type='text/javascript'>(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-XXX-1', 'auto' );ga( 'require', 'linkid' );ga( 'set', 'anonymizeIp', true );
    		ga( 'set', 'dimension1', 'no' );
    ga( 'require', 'ec' );ga( 'set', '&cu', 'USD' );ga( 'ec:addProduct', {'id': '627','name': 'pancake mix','category': 'Uncategorized','price': '10','quantity': '1'});ga( 'ec:setAction', 'purchase', {
    			'id': '1814',
    			'affiliation': 'woo',
    			'revenue': '25.00',
    			'tax': '0',
    			'shipping': '15.00'
    		} );</script>
    

    And this is a screenshot from the thank you page:


    Link to image: https://cld.wthms.co/9AbDmX

    This seems to have all of the information you need.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Looking for Thank You page data layer variables’ is closed to new replies.