Announcement

Collapse
No announcement yet.

Search engine friendly URIs in google analytics

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

    Search engine friendly URIs in google analytics

    I wonder if anyone knows how to get google analytics to use search engine friendly URIs? When I look at the Overview in Real-Time, it often will show the long URIs, such as /mm5/merchant.mvc?Store_Code=xxx&Screen=CTGY&Category_C ode=xxx instead of /product-name
    Thanks!
    Cameron
    Trent Studios, LLC
    Graphic Design, Website Design
    TrentStudios.com
    (970) 568-8652

    #2
    There is a bug on this in the GA module that will be fixed in 9.6. In the mean time you would have to modify the GA code to output your correct URL structure.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Where, and how, do I edit the the GA code? Thanks, Brennan!
      Trent Studios, LLC
      Graphic Design, Website Design
      TrentStudios.com
      (970) 568-8652

      Comment


        #4
        Here is an example for doing a Lookup of Canonical URIs, see #9: http://docs.miva.com/v1.0/docs/uri-m...-documentation The Google Analytics tracking snippet needs to be customized using this method to obtain/pass the proper URI via pageview.

        Comment


          #5
          Hi, Dan.
          Thank you for that.
          However, I'm unsure what to do with that code.
          Code:
           
           <mvt:assign name="l.uri:store_id" value="g.Store:id" /> <mvt:assign name="l.uri:screen" value="''" /> <mvt:assign name="l.uri:page_id" value="0" /> <mvt:assign name="l.uri:cat_id" value="0" /> <mvt:assign name="l.uri:product_id" value="1" />   <mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" /> <mvt:if expr="l.have_uri">            &mvt:canonical_uri:canonical; <br>            &mvt:canonical_uri:cat_id;<br>            &mvt:canonical_uri:page_id;<br>            &mvt:canonical_uri:status;<br>            &mvt:canonical_uri:store_id;<br>            &mvt:canonical_uri:uri;<br> </mvt:if>
          Trent Studios, LLC
          Graphic Design, Website Design
          TrentStudios.com
          (970) 568-8652

          Comment


            #6
            Is it necessarily a problem that google shows the long URIs? The little research I've done suggests it's not recommended, but not necessarily a problem. I wonder what others have found...
            Last edited by cway; 01-21-16, 09:27 AM.
            Trent Studios, LLC
            Graphic Design, Website Design
            TrentStudios.com
            (970) 568-8652

            Comment


              #7
              Brennan, do you know when 9.6 will be out, approximately?
              Trent Studios, LLC
              Graphic Design, Website Design
              TrentStudios.com
              (970) 568-8652

              Comment


                #8
                9.6 is a ways off, sometime in Q2.
                Thanks,

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

                Comment


                  #9
                  I can also confirm this bug. Glad it is being fixed in 9.6. Thank you Brennan and Rick!
                  Carlos Rivera - Web Developer
                  Haddrell's Point Tackle - haddrellspoint.com

                  Comment


                    #10
                    I had to insert some code into the module's template to allow ecommerce tracking (as the checkbox on the settings page for the module did not properly set this up for my store by default). However after some adjustments, I was able to verify goal and ecommerce tracking within Google Analytics using the new URIs in Miva 9.00053. I know this is a temporary solution until the official 9.6 solution comes out.

                    It would be nice to have a new Google Analytics tutorial from Miva when 9.6 comes out to address proper goal and ecommerce tracking setups.
                    Carlos Rivera - Web Developer
                    Haddrell's Point Tackle - haddrellspoint.com

                    Comment


                      #11
                      Originally posted by elcucococo View Post
                      I had to insert some code into the module's template to allow ecommerce tracking (as the checkbox on the settings page for the module did not properly set this up for my store by default). However after some adjustments, I was able to verify goal and ecommerce tracking within Google Analytics using the new URIs in Miva 9.00053. I know this is a temporary solution until the official 9.6 solution comes out.

                      It would be nice to have a new Google Analytics tutorial from Miva when 9.6 comes out to address proper goal and ecommerce tracking setups.
                      Agreed - could you share your workaround with the group, please?
                      Leslie Kirk
                      Miva Certified Developer
                      Miva Merchant Specialist since 1997
                      Previously of Webs Your Way
                      (aka Leslie Nord leslienord)

                      Email me: [email protected]
                      www.lesliekirk.com

                      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                      Comment


                        #12
                        Originally posted by lesliekirk View Post
                        Agreed - could you share your workaround with the group, please?
                        Gladly, Leslie!

                        HTML Code:
                        <!-- Start Google Analytics Tracking Code --->
                        <mvt:miva compresswhitespace="off" />
                        <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', '<mvt:item name="ga_jsencode" param="ga_tracking:google_id_unencoded" />', 'auto');
                        
                        <!-- Start Google Analytics Ecommerce Tracking Code --->
                        <mvt:if expr="l.settings:page:code EQ 'INVC'">
                            ga('require', 'ecommerce');
                        
                            ga( 'ecommerce:addTransaction', {
                                'id'            : '<mvt:eval expr="int( l.settings:ga_tracking:order_id )" />',
                                'revenue'        : '<mvt:item name="ga_jsencode" param="ga_tracking:order_total" />',
                                'affiliation'    : '<mvt:item name="ga_jsencode" param="store:name" />',
                                'tax'            : '<mvt:item name="ga_jsencode" param="ga_tracking:total_tax" />',
                                'shipping'        : '<mvt:item name="ga_jsencode" param="ga_tracking:total_ship" />'
                            } );
                        
                            <mvt:foreach iterator="ga_orderitem" array="ga_tracking:orderitems">
                            ga( 'ecommerce:addItem', {
                                'id'        : '<mvt:eval expr="int( l.settings:ga_tracking:order_id )" />',
                                'name'        : '<mvt:item name="ga_jsencode" param="ga_orderitem:name_unencoded" />',
                                'price'        : '<mvt:item name="ga_jsencode" param="ga_orderitem:price" />',
                                'sku'        : '<mvt:item name="ga_jsencode" param="ga_orderitem:code_unencoded" />',
                                'category'    : '<mvt:item name="ga_jsencode" param="ga_orderitem:cancat_code_unencoded" />',
                                'quantity'     : '<mvt:eval expr="l.settings:ga_orderitem:quantity" />'
                            } );
                            </mvt:foreach>
                        
                            ga( 'ecommerce:send' );
                            <!-- Send Google Analytics Tracking Code for INVOICE pages --->
                            ga( 'send', 'pageview', { 'page':'/<mvt:item name="ga_jsencode" param="ga_tracking:url_override_unencoded" />' } );
                        </mvt:if>
                        <!-- End Google Analytics Ecommerce Tracking Code --->
                        
                        <!-- Send Google Analytics Tracking Code for non-INVOICE pages --->
                        <mvt:if expr="NOT g.UI_Exception">
                        ga( 'send', 'pageview', { 'page':'/<mvt:item name="ga_jsencode" param="ga_tracking:url_override_unencoded" />' } );
                        </mvt:if>
                        
                        </script>
                        <!-- End Google Analytics Tracking Code --->

                        I am not claiming 100% accuracy. However, I can confirm my goals and ecommerce tracking are working as expected from within Google Analytics. Here is a screenshot of my Goal setup within GA (each goal URL begins with "/mm5/merchant.mvc?Store_Code=HPT&Screen="): http://www.haddrellspoint.com/screenshot.png

                        I will stipulate that the above code and GA goals settings will have to be updated with more official code once Miva releases 9.6 with the GA URI bug fix. Let me know if you have any questions! Thank you!
                        Last edited by elcucococo; 05-09-16, 04:48 PM.
                        Carlos Rivera - Web Developer
                        Haddrell's Point Tackle - haddrellspoint.com

                        Comment


                          #13
                          Thank you ever so much!!!
                          Leslie Kirk
                          Miva Certified Developer
                          Miva Merchant Specialist since 1997
                          Previously of Webs Your Way
                          (aka Leslie Nord leslienord)

                          Email me: [email protected]
                          www.lesliekirk.com

                          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                          Comment

                          Working...
                          X