Announcement

Collapse
No announcement yet.

Google Analytics Revenue Tracking Not Working

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

    Google Analytics Revenue Tracking Not Working

    A client with a new instance of Swift reported that their Google Analytics Revenue Tracking had stopped working.

    Gary kindly looked at the issue and has advised the following:

    These are two separate issues, one is a bug within swift, which can be resolved by going to 'Design | Library | Layouts' and scrolling down to the 'Web Page Inner Layout' and opening the layout 'Receipt Page Bulk RWD'.

    Scroll down to line: 60 where you should see: -

    Code:
      
     window.uetq.push({ 'gv' : NETQUOTEVAR:ORDERTOTALBASEUNIT, 'gc': 'GBP' });
    and placing single quotation marks around NETQUOTEVAR:ORDERTOTALBASEUNIT so that it looks like this: -

    Code:
      
     window.uetq.push({ 'gv' : 'NETQUOTEVAR:ORDERTOTALBASEUNIT', 'gc': 'GBP' });
    The other is the location of the Google analytics code. It needs to be moved from the footer to just before the </head> tag.

    Thank you to Gary.
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Hi Jonathan. I am trying to make sure I incorporate all the bug fixes that need doing as I go along. I have corrected the missing single quotation marks for the above, but could you give me a little more information on the 2nd part that needs correcting?

    I am unsure which layout this is referring to. Many thanks.

    Comment


      #3
      In all the outer layouts ever since Actinic emerged from the primeval soup Actinic now Sellerdeck has put the tracking code and the bottom of the outer layout, Google says it should be in the <head> before the </head> tag, although Bruce has said that this might cause double triggering. However Google wishes it in the <head> so I go with this:

      Click image for larger version

Name:	gtcplace.jpg
Views:	236
Size:	107.3 KB
ID:	552635

      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        Hi Johathan,

        thank you for pointing this out. But in trying to do as you suggest, I know the following discrepancies (which may help you!)

        I am trying to ensure this is done in my Swift template but note your example above is in Responsive Outer Layout. I am somewhat confused as it does not appear to be the location for Swift? I am assuming of course that the Swift template uses the Swift layouts so if that is wrong that might explain it.


        The Swift outer layout calls at the top for the sub layout "UXHeadCode Swift", which is contained within the <head> tags.
        Line 5 <actinic:variable name="UXTemplateArea" value="UXHeadCode Swift" />
        This layout includes JavaScriptFunctions <actinic:variable name="JavaScriptFunctions" /> on Line 17 which is then wholly within the <head> tags.. The Java Script Header tags includes <actinic:variable value="Google Analytics Tracking Code Split SSL" name="GoogleAnalyticsMarkup" selectable="false" /> which is wonderful, except apparently its not used.


        and later "UXSubBodyCode Swift" which is OUTSIDE the <head> tags but does include the layout <actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Tracking Code" />
        Line 178 <actinic:variable name="UXTemplateArea" value="UXSubBodyCode Swift" />
        This layout also includes the Bing tracking code [side note which gives a javascript error as soon as you put the BING UET code in] and adwords (which I think is now superceded with a common google tracking code).

        My thoughts are given Google and Bing want their codes within the <head> tags, would it be best to move the Google Analytics Tracking Code and Bing code to 'UXHeadCode Swift' layout?

        Any thoughts?

        Kind regards,



        Phil Howell

        Phil Howell
        Director
        Intuition Un Ltd
        www.turmerlicious.com A range of delicious Turmeric Latte's #veryaddictive

        Also
        Awarding winning publishers of Natal Hypnotherapy™, the UK's leading provider of hypnosis for conception, pregnancy and child birth having helped over 100,000 women through antenatal courses and self hypnosis CDs
        www.natalhypnotherapy.co.uk Hypnobirthing in English
        www.natalhypnotherapy.fr Hypnobirthing in french
        www.hypnobirthingclass.online Online antenatal training

        Comment


          #5
          There you go...

          Click image for larger version

Name:	tracking-swift.jpg
Views:	159
Size:	467.8 KB
ID:	553081

          However, be aware that Bruce still thinks the Tracking code whould go in the footer:
          From memory, I’m not sure our code works in the head.
          In any case, we have a different take on the position. In our view, putting in in the head can lead to overcounting, if a page fails to load fully. I can see the advantage from Google’s point of view, but most people put code like that at the foot of the page.
          I am not sure that I agree but it is up to you to decide what you think would be best on your site.
          Jonathan Chappell
          Website Designer
          SellerDeck Website Designer
          Actinic to SellerDeck upgrades
          Graphicz Limited - www.graphicz.co.uk

          Comment


            #6
            Hi Jonathan, thanks we agree on that. Cheers Phil
            Phil Howell
            Director
            Intuition Un Ltd
            www.turmerlicious.com A range of delicious Turmeric Latte's #veryaddictive

            Also
            Awarding winning publishers of Natal Hypnotherapy™, the UK's leading provider of hypnosis for conception, pregnancy and child birth having helped over 100,000 women through antenatal courses and self hypnosis CDs
            www.natalhypnotherapy.co.uk Hypnobirthing in English
            www.natalhypnotherapy.fr Hypnobirthing in french
            www.hypnobirthingclass.online Online antenatal training

            Comment


              #7
              Just checked and given this code in "<actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Tracking Code" />" does external calls, should it be held in its own block if with a condition isnotpreviewmode?

              What do you think?

              Cheers,

              Phil
              Phil Howell
              Director
              Intuition Un Ltd
              www.turmerlicious.com A range of delicious Turmeric Latte's #veryaddictive

              Also
              Awarding winning publishers of Natal Hypnotherapy™, the UK's leading provider of hypnosis for conception, pregnancy and child birth having helped over 100,000 women through antenatal courses and self hypnosis CDs
              www.natalhypnotherapy.co.uk Hypnobirthing in English
              www.natalhypnotherapy.fr Hypnobirthing in french
              www.hypnobirthingclass.online Online antenatal training

              Comment


                #8
                An isnotpreviewmode block around such code make sense.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Thank you Norman.
                  Phil Howell
                  Director
                  Intuition Un Ltd
                  www.turmerlicious.com A range of delicious Turmeric Latte's #veryaddictive

                  Also
                  Awarding winning publishers of Natal Hypnotherapy™, the UK's leading provider of hypnosis for conception, pregnancy and child birth having helped over 100,000 women through antenatal courses and self hypnosis CDs
                  www.natalhypnotherapy.co.uk Hypnobirthing in English
                  www.natalhypnotherapy.fr Hypnobirthing in french
                  www.hypnobirthingclass.online Online antenatal training

                  Comment

                  Working...
                  X