Announcement

Collapse
No announcement yet.

Google Analytics in v10.0.4

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

    Google Analytics in v10.0.4

    Hi All,

    I have enabled google analytics in the very latest version v10.0.4 as per the help files.

    I have uploaded my site, but after logging in to google analytics there is just an exclamation mark next to the account for my shop.

    It says (exclamation mark) Tracking unknown.

    I understand google updated their code recently, but I presumed the latest version of actinic would include the latest code?

    Can anyone advise how to get this working? Thanks.
    Arka Tribal Jewellery

    #2
    Thus is the code you need for basic GA in the Google Analytics Tracking Code layout:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true" >
          <script type="text/javascript">
              var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
              document.write(unescape("%3Cscript src%3D'" + gaJsHost + "google-analytics.com/ga%2Ejs' type='text/javascript'%3E%3C/script%3E"));
          </script>
          <script type="text/javascript">
          if (typeof(_gat) == 'object')
              {
              var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />");
              pageTracker._initData();
              pageTracker._trackPageview();
              }
          </script>
    </actinic:block>

    Comment


      #3
      Hi Duncan,

      Thanks for the reply,
      I looked in the Design : Library > Google Analytics Markup > Google Analytics Tracking Code and the code there seems to be the same as the code you posted above...

      This is the code thats in my version v10.0.4

      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true" >
      <script type="text/javascript">
      <!--
      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
      //-->
      </script>
      <script type="text/javascript">
      <!--
      var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />");
      pageTracker._initData();
      pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
      //-->
      </script>
      </actinic:block>
      It seems that google has started to pick up data from the site now, using the code that was already there...

      I'm new to Google Analytics so can someone explain this thread;
      http://community.actinic.com/showthr...ogle+analytics

      Google analytics supplied me with the new code..
      Is it necessary to use the new code Duncan.. ? As it seems you supplied me with the old code.. bit confused.
      Arka Tribal Jewellery

      Comment


        #4
        I use that code on lots of sites, so I'd leave it as is.

        Comment


          #5
          ok Duncan thanks
          Arka Tribal Jewellery

          Comment


            #6
            mmmmm..... I'm using standard Google Analytics code as supplied with 10.0.4

            Code:
             
            <!--
             var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />");
             pageTracker._initData();
             pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
            //-->
            and it generates

            Code:
             <!-- 
            var pageTracker = _gat._getTracker("UA-9999999-4 
            /"); 
            pageTracker._initData(); 
            pageTracker._trackPageview(); 
            //-->
            which generates a Javascript error "Unterminated string constant" as shown on http://www.fmcgcollectables.com/memo...lectables.html

            Any idea what causes the extra line feed after the GA tracking number?
            Elysium:Online - Official Accredited SellerDeck Partner
            SellerDeck Design, Build, Hosting & Promotion
            Based in rural Northants

            Comment


              #7
              Perhaps the newline has been entered into the Variable. Check your settings, delete everythign and re-enter it.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Ooops!

                Thanks Norm!
                Elysium:Online - Official Accredited SellerDeck Partner
                SellerDeck Design, Build, Hosting & Promotion
                Based in rural Northants

                Comment

                Working...
                X