Announcement

Collapse
No announcement yet.

Universal Analytics and Ecommerce Data???

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

    Universal Analytics and Ecommerce Data???

    Is anyone using google Universal Analytics able to track their ecommerce data?

    Haven't been able to track ecommerce data since I changed over to universal analytics a couple months back.

    Heck, just being able to track which checkout pages customers reached would be very welcome.

    Thanks in advance.
    Last edited by Siamese-Dream.Com; 10-06-14, 02:56 PM.
    Mark Romero
    ~~~~~~~~

    #2
    Re: Universal Analytics and Ecommerce Data???

    I see that goolge has some documentation that sort of outlines how to override page tracking. They basically wrote this:

    If you need to override the default location information, you should update the title and page values directly. To override the default page value, you can pass the ga command an additional parameter:

    Code:
    ga('send', 'pageview', '/my-overridden-page?id=1');
    Alternatively, to override these values, the send command accepts an optional field object as the last parameter. The field object is a standard JavaScript object, but defines specific field names and values accepted by analytics.js.

    Code:
      ga('send', 'pageview', {
      'page': '/my-overridden-page?id=1',
      'title': 'my overridden page'
    });
    So if I wanted google anlytics to track pages such as OPAY and INVC, then what values would I need to plug in to the above script???

    Would I have to do something like this????

    Code:
    <mvt:if expr="g.screen EQ 'OSEL'">
    ga('send', 'pageview', '/OSEL');
    <mvt:elseif expr="g.screen EQ 'OPAY'">
    ga('send', 'pageview', '/OPAY');
    <mvt:elseif expr="g.screen EQ 'INVC'">
    ga('send', 'pageview', '/INVC');
    <mvt:else>
    ga('send', 'pageview', '/INVC');
    </mvt:if>
    ~~~~

    And again, how would I send conversion data to google?

    Thanks in advance.
    Last edited by Siamese-Dream.Com; 10-06-14, 03:39 PM.
    Mark Romero
    ~~~~~~~~

    Comment


      #3
      Re: Universal Analytics and Ecommerce Data???

      We're supporting natively both UA and their new advanced Ecom tracking in point and click mode with V9, FWIW.
      Thanks,

      Rick Wilson
      CEO
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Re: Universal Analytics and Ecommerce Data???

        Thanks for the tip. good to hear.
        Mark Romero
        ~~~~~~~~

        Comment


          #5
          Re: Universal Analytics and Ecommerce Data???

          We usually find that we have to make adjustments to the standard Google Analytics integration to best fit the needs of the store. I also recommend using l.settings:page:code vs. g.Screen as it is more reliable/accurate. (unless you are using the MvMobile integration which overrides that variable)

          Comment


            #6
            Re: Universal Analytics and Ecommerce Data???

            Sorry to be late to the party again. This works for us:


            Code:
            ga('create', 'UA-YOURACCTNO-1', 'auto');
              <mvt:if expr="l.settings:page:code EQ 'CTGY'">
              ga('send', 'pageview', '/&mvte:category:code;');
              <mvt:elseif expr="l.settings:page:code EQ 'PROD'">
              ga('send', 'pageview', '/&mvte:product:code;');
              <mvt:elseif expr="l.settings:page:code EQ 'BASK'">
              ga('send', 'pageview', '/BASK');
              <mvt:elseif expr="l.settings:page:code EQ 'OCST'">
              ga('send', 'pageview', '/OCST');
              <mvt:elseif expr="l.settings:page:code EQ 'OSEL'">
              ga('send', 'pageview', '/OSEL');
              <mvt:elseif expr="l.settings:page:code EQ 'OPAY'">
              ga('send', 'pageview', '/OPAY');
              <mvt:elseif expr="l.settings:page:code EQ 'INVC' AND NOT g.Error_Message_Count">
              ga('send', 'pageview', '/INVC');
              ga('require', 'ecommerce');   // Load the ecommerce plug-in.
              ga('ecommerce:addTransaction', {
              'id': '<mvt:if expr="NOT ISNULL l.settings:order:id">&mvt:order:id;<mvt:else>0000</mvt:if>',  // Transaction ID. Required
              'affiliation': 'YourStore.com',   // Affiliation or store name
              'revenue': '&mvt:order:total;',               // Grand Total
              'shipping': '<mvt:foreach iterator="charge" array="order:charges"><mvt:if expr="l.settings:charge:type EQ 'SHIPPING'">&mvte:charge:amount;<mvt:else>0.00</mvt:if></mvt:foreach>',  // Shipping
              'tax': '<mvt:foreach iterator="charge" array="order:charges"><mvt:if expr="l.settings:charge:type EQ 'TAX'">&mvte:charge:amount;<mvt:else>0.00</mvt:if></mvt:foreach>'  // Tax
            });
            
              ga('ecommerce:send'); //submits transaction to the Analytics servers
              <mvt:else>
              ga('send', 'pageview');
            </mvt:if>
            Last edited by nottheusual1; 10-06-14, 11:08 PM.

            Comment


              #7
              Re: Universal Analytics and Ecommerce Data???

              I also recommend using l.settings:page:code vs. g.Screen as it is more reliable/accurate.
              thanks for the tip.

              "Sorry to be late to the party again. This works for us:"
              On the contrary: Perfect timing, and thank you very much for the code sample.
              Mark Romero
              ~~~~~~~~

              Comment

              Working...
              X