Loading ...
Sorry, an error occurred while loading the content.

Re: [webanalytics] Re: Tracking shopping cart on another domain

Expand Messages
  • Paul Holding
    Hi guys, Thanks ever so much to both for replying. I ll give that code I try. I realised after reading the Google instructions that the
    Message 1 of 4 , Mar 1, 2012
    • 0 Attachment
      Hi guys,

      Thanks ever so much to both for replying. I'll give that code I try. I realised after reading the Google instructions that the <a..... _link..../a> was not supposed to be included in the actual tracking script but in the link ;)

      One thing I forgot (as I didn't realise it had any bearing) is that clicking on the link for the shopping cart opens into another window. I realise that I have to use getlinker to be able to make this work. This bit of code I do inlcude in the Google tracking script, I think? Any ideas? Does that then mean I'm going to have problems with Internet Explorer and third party cookies...?

      And one other thing.....I have a feeling this might have a big bearing on things too......

      When you click on the link to get to the shopping cart, that link is redirected to another link (I don't know why it's done like that), so you end up on a completely different link to the original link. I fear that this will mean none of the cookie info will be able to be passed on? Is that correct and is there a solution to this?

      Again, thanks so much for your help.
       
      Adventures of a Splitboarder
      www.paulholding.com


      ________________________________
      From: abdou_shalaby <abdo.shalaby@...>
      To: webanalytics@yahoogroups.com
      Sent: Wednesday, 29 February 2012, 5:45
      Subject: [webanalytics] Re: Tracking shopping cart on another domain


       
      Hi Paul,

      First, you have to make sure that your shopping cart support Google analytics. If they support it (Allow you install your GA code at your pages their), then do the following steps:

      1- Update your Google analytics code to be like the following:
      <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-10611857-1']);
      _gaq.push(['_setDomainName', 'YourWebsiteDomain.com']);
      _gaq.push(['_setAllowLinker', true]);
      _gaq.push(['_trackPageview']);

      (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

      </script>

      2- Make sure your Google analytics code installed in all your web pages and in your pages at the shopping card pages.

      3 - Tag the links to the shopping card with the following code:

      - Link case :
      > <a href="www.example.com"
      > onclick="_gaq.push(['_link', 'www.example.com']); return false;">View My Site</a>

      - Form Case :
      > <form name="f" method="post" onsubmit="_gaq.push(['_linkByPost', this]);">

      Also, you have to tag links from the shopping card to your website with the same method.

      4- Until now, you will be able to track the 5 steps funnels. To track Ecommerce data, please check the following : http://code.google.com/apis/analytics/docs/tracking/gaTrackingEcommerce.html
      http://analytics.blogspot.com/2009/05/how-to-use-ecommerce-tracking-in-google.html

      Finished :)

      --- In webanalytics@yahoogroups.com, "Paul" <pholding2001@...> wrote:
      >
      > Hi guys,
      >
      > I hope you can help here. I cross over into Analytics where I can but am still very green.
      >
      > We have a client who has a link on their main site which links to a shopping cart on another site. At the moment, they only have GA on their own site and are not tracking the five steps of the shopping site. Being the conscientious person that I am (;)), I've volunteered to try and get the data included from the shopping cart into their GA account. I've looked high and low on the web to try and find a solution. Nothing I've found makes me feel like I'm getting ALL the information I need, so I thought I would turn to this forum.
      >
      > I know that I need to change the code on the client's site and I've found this for the client's site:
      >
      >
      > var _gaq = _gaq || [];
      > _gaq.push(['_setAccount', 'UA-12345-1']);
      > _gaq.push(['_setAllowLinker', true]);
      > _gaq.push(['_setDomainName', 'site.com']);
      > ...
      > <a href="www.blog-hosting-service.com/myBlog"
      > onclick="_gaq.push(['_link', 'www.blog-hosting-service.com/myBlog']); return false;">View My Blog</a>
      > ...
      > <form name="f" method="post" onsubmit="_gaq.push(['_linkByPost', this]);">
      >
      > Question:
      >
      > 1. Does this come in addition to the standard code that is on the site or does it replace it or is it a combination of both questions?
      >
      > 2. Do I have to use this new code on all pages of my clients site or only the ones where there is a link out to the shopping cart?
      >
      > And I've found this for the shopping cart site:
      >
      > var _gaq = _gaq || [];
      > _gaq.push(['_setAccount', 'UA-12345-1']);
      > _gaq.push(['_setDomainName', 'none']);
      > _gaq.push(['_setAllowLinker', true]);
      > ...
      > <a href="www.example.com"
      > onclick="_gaq.push(['_link', 'www.example.com']); return false;">View My Site</a>
      > ...
      > <form name="f" method="post" onsubmit="_gaq.push(['_linkByPost', this]);">
      >
      > Question:
      >
      > 1. Again is this the complete code or do I take the standard code and add it to that.
      >
      > I'm just very worried about playing around with the code and ruining the stats, so I hope someone can help before I end up having to do that!
      >
      > Thanks very much for any help.
      >
      > Paul
      >




      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.