Google Analytics Help on SFNT page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SidFeyDesigns
    Mighty Mivite








    • Jan 2012
    • 598

    #1

    Google Analytics Help on SFNT page

    I was wondering if there is a way to make sure that when google analytics is tracking page views on the SFNT page that it tracks it as https://www.example.com/ instead of https://www.example.com/SFNT.html

    Here is what i see when using the tag assistant on google chrome:

    Code:
     URL:https://dev.loveisarose.com/
    Time:May 24, 2018 09:30:15 AM
    Page Load:1.17 s
    Tags:[LIST][*]2 in Total[/LIST]
    
    Web Property IDUA-35855362-1
    Code Version/SyntaxUniversal
    Protocol version number1
    Code Snippet
    ...
    ga ( 'create' , 'UA-35855362-1' , 'auto' );
    ga ( 'send' , 'pageview' , { 'page' : '/\/SFNT.html' } );
    Using the tracking code that came with Miva 9

    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');
    
    ga( 'send', 'pageview', { 'page':'/<mvt:item name="ga_jsencode" param="ga_tracking:url_override_unencoded" />' } );
    
    </script>
    Also we are using toolkit short links

    Thanks
    Nick Harkins
    www.loveisarose.com
  • 216justin
    Mini Mivite

    • May 2018
    • 37

    #2
    If you simply need to force a certain pageview value for the SFNT page, you could take your existing code and modify it with the following:

    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');
    <mvt:if expr="l.settings:page:code EQ 'SFNT'">
        ga( 'send', 'pageview', { 'page':'/' } );
    <mvt:else>
        ga( 'send', 'pageview', { 'page':'/<mvt:item name="ga_jsencode" param="ga_tracking:url_override_unencoded" />' } );
    </mvt:if>
    </script>
    Justin Sims
    216digital
    Cleveland Area - Code and Design
    https://216digital.com/

    Comment

    • SidFeyDesigns
      Mighty Mivite








      • Jan 2012
      • 598

      #3
      That worked perfectly. Thank you!
      Nick Harkins
      www.loveisarose.com

      Comment

      • 216justin
        Mini Mivite

        • May 2018
        • 37

        #4
        Always happy to help.
        Justin Sims
        216digital
        Cleveland Area - Code and Design
        https://216digital.com/

        Comment

        Working...
        X