Announcement

Collapse
No announcement yet.

Daves guide to Google Analytics with Actinic

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

    #46
    Am I reading this right?

    Remmo said if we use our own SSL then the google link has to be to https as well.

    If your taking card details manually then and have a secure server set up then the bit of code in Act_CheckoutPrimary.html that reads:

    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

    needs to read:

    <script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
    Seems to work without.

    Comment


      #47
      According to Google - http://adwords.google.com/support/bi...846&topic=8178 - it should be;

      <script src=" https://ssl.google-analytics.com/urchin.js" type="text/javascript">

      It looks like we should use this.

      Comment


        #48
        Thanks Alistair... that fixed up the problem for me

        Comment


          #49
          Originally posted by skinnybloke

          I would like to implement anqi's additional code but would not be too happy having to download order04.html to amend as I'm sure I some point I would overwrite it with an upload.

          Anybody clever enough to suggest a solution whereby this can be done on the PC before an upload (definitely not me...)?
          Any answers to this ? My guess is that order04.html is not a file that would change often unless doing a manual edit of the template file, so if (I assume) only changed files are uploaded then there is a minimal risk of overwriting on upload? - Am I right (or just niaeve) ??

          Comment


            #50
            Would somebody mind uploading to here a copy of an order04.html so that numpties like me can see a working example of how this code should be added ? Particularly interested in an example using Smart Theme as thats what I use.

            Thanks

            John


            Originally posted by anqi
            <body onLoad="javascript:__utmSetTrans()">

            <script type="text/javascript">
            <!--
            var utmt, utmi, utmordernumber, utmprice, utminvoice;
            utmi = "";
            utmordernumber = "NETQUOTEVAR:THEORDERNUMBER";
            utminvoice = "NETQUOTEVAR:INVOICEADDRESS3|NETQUOTEVAR:INVOICEADDRESS4|NETQUOTEVAR:INVOICECOUNTRY";
            -->
            </script>


            <Actinic:XMLTEMPLATE NAME="ShoppingCart">
            <Actinic:XMLTEMPLATE NAME="OrderLine">
            <script type="text/javascript">
            <!--
            utmt = "UTM:T|" + utmordernumber + "|Main Store|NETQUOTEVAR:TOTAL|NETQUOTEVAR:TAX1| NETQUOTEVAR:SHIPPING|" + utminvoice;
            utmprice = "NETQUOTEVAR:PRICE";
            -->
            </script>

            <Actinic:XMLTEMPLATE NAME="ProductLine">
            <script type="text/javascript">
            <!--
            utmi += " UTM:I|" + utmordernumber + "|NETQUOTEVAR:PRODREF|NETQUOTEVAR:PRODUCTNAME|STOCK BAGS|" + utmprice + "|NETQUOTEVAR:QUANTITY";
            -->
            </script>
            </Actinic:XMLTEMPLATE>
            </Actinic:XMLTEMPLATE>
            </Actinic:XMLTEMPLATE>


            <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
            </script>
            <script type="text/javascript">
            _uacct="UA-xxxx-x";
            urchinTracker();
            document.write('<form style="display:none;" name="utmform"><textarea id="utmtrans">' + utmt + utmi + '</textarea></form>';
            </script>
            </body>


            amend order04 to the above structure (irrelavant codes are omitted) after upload.

            because analytics is so popular, why not integrate it into actinic v8? then problem 3 is not a problem at all.

            Comment


              #51
              Any body able to respond to previous post ??

              Comment


                #52
                Sorry I can't help but bumping up your message - hopefully someone else can

                Comment


                  #53
                  Receipt.html

                  Hi - in the explanations mentioned above the page /receipt.html was suggested for the receipt page.


                  is /receipt.html still the correct path?

                  Thanx

                  Comment


                    #54
                    Receipt.html is the correct name as long as you set up your GOAL URL in your Analytics profile to be the same.

                    The file Receipt.html doesn't actually exist. It's used (by urchinTracker) as a trigger to tell Analytics that the receipt page has been reached. You can't use the actual URL of the receipt page because it isn't unique. The receipt page is dynamically generated and has the same URL as the other checkout pages. So if you were to use http://www.yoursite.com/cgi-bin/os000008.pl as your goal, it would trigger everytime a customer started the checkout process and not when they have completed it.

                    Dave

                    Comment


                      #55
                      This is a related question - thanks to Dave I have Google Analytics working brilliantly (thank you thank you), but Google has reported a couple of transactions with the decimal point in the wrong place (ie £2600 rather than £26) and this is throwing all the data out of whack. (No idea why this happened just for two transactions and not for the rest).

                      I know I need to post a negative transaction to get rid of this skew, but Google doesn't seem to be reading my negative post page, which I have created as receipt.html in the site root, with the same transaction number and negative total as the original order. I've tried tweo or three times and waited a few days with no result.

                      Has anyone been able to post negative transactions successfully? Should I in fact be assigning a different transaction number for a negative post?

                      Grateful for any advice.

                      Comment


                        #56
                        actorder04.html

                        Just trying to bump john's post about order04.html file.. i'm lost as to how you would use that code as well ? So if anyone has worked it out.. Any feedback appreciated..

                        Cheers
                        Shannon
                        Shannon
                        Big Game Hunters
                        Trampoline Specialists - Etoyszone Trampolines
                        Trampolines and Outdoor Toys - Garden Games
                        Table Tennis Table - Table Tennis Specialist Shop
                        Trampoline Brand Information - Trampolines 4 Sale
                        Climbing Frames - Wooden Climbing Frames
                        Trampoline Specialist Blog
                        Table Tennis Blog

                        Comment


                          #57
                          See Google Data

                          The purpose of this Post
                          1 - Achieve ANG post without the need to edit order04.html and prevent the risk of over writing on the next upload

                          2- To see the data that is being sent to google


                          1 - Acheive ANG post without the need to edit order04.html and prevent the risk of over writing on the next upload: -

                          I have just implemented the example code posted by Ang (thanks Ang)
                          I have done this by editing the act_shoppingcartxml.html rather than editing the order04.htm

                          I inserted the required script at the points where act_shoppingcartxml.html calls orderline and productline

                          this seems to have worked OK
                          Heres a snippet from my act_shoppingcartxml.html: -
                          inserted just after the productline end:-
                          '
                          <script type="text/javascript">
                          <!- utmi += " UTM:I|" + utmordernumber + "|NETQUOTEVAR:PRODREF|NETQUOTEVAR:PRODUCTNAME|STOCK BAGS|" + utmprice + "|NETQUOTEVAR:QUANTITY";-->
                          </script>

                          <!-- Product line end -->
                          '
                          Inserted just after the order line end
                          '
                          <script type="text/javascript">
                          <!--utmt = "UTM:T|" + utmordernumber + "|Main Store|NETQUOTEVAR:TOTAL|NETQUOTEVAR:TAX1| NETQUOTEVAR:SHIPPING|" + utminvoice;utmprice = "NETQUOTEVAR:PRICE";--></script>
                          <!-- Order line end -->
                          '


                          2- To see the data that is being sent to google: -
                          <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
                          </script>
                          <script type="text/javascript">
                          _uacct="UA-xxxx-x";
                          urchinTracker();
                          document.write('<form style="display:none;" name="utmform"><textarea id="utmtrans">' + utmt + utmi + '</textarea></form>';
                          </script>
                          </body>

                          one small point held me up was the missing closing bracket from the document write statement on the receipt primary

                          but one useful test i came across was to remove the 'style="display:none;"

                          this allowed me to see the data which would be sent to google

                          This info may seem obvious but it wasn't to me so i thought it better to post than not

                          Hope this is of some use Thanks Dave for starting this much needed post
                          Thanks Ang for your code example
                          Paul Hesford
                          Web Design Wigan

                          Based in the Northwest of England UK, provides web design, programming, e-commerce and web hosting services

                          Cheap Whey Protein from Powerbeck
                          Web Designer in Wigan
                          Actinic Hosting
                          Dog Kennels and Runs

                          Comment


                            #58
                            Originally posted by chris ashdown
                            I use protx and no additional code was required to make it work just finger trouble

                            I hand coded in the line

                            "NETQUOTEVAR:ONLOAD;javascript:__utmSetTrans();"

                            as shown in daves handy notes but put a single underscore where in fact it is two underscores joined together
                            Hi

                            Can someone confirm for me whether there should be one underscore or two?

                            All my other pages are being shown in analytics, except the receipt page, so I was wondering whether the number of underscores could be the problem?

                            My site goes from the shopping cart, to nochex servers and then back to our site where the receipt page is shown. When I do a test order I can see the code showing on the page, but analytics does not seem aware of a receipt.html being requested from the server.

                            Any ideas?

                            Pete

                            Comment


                              #59
                              Hi Pete,
                              It should be two underscores.

                              Have you added the following code in your HEAD section for Act_ReceiptPrimary:

                              Code:
                              <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
                              </script>
                              <script type="text/javascript">
                              _uacct = "UA-XXXXXX-X";
                              urchinTracker('receipt.html');
                              </script>
                              Note the subtle difference in this code. The call to urchinTracker has receipt.html in it this time.

                              Comment


                                #60
                                Hi

                                I do have that code with urchinTracker('receipt.html');

                                Pete

                                Comment

                                Working...
                                X