Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: Google analytics - third party shopping cart

  1. #1
    Member
    Join Date
    Oct 2005
    Posts
    60

    Google analytics - third party shopping cart

    Hi-

    I have what I think is a rather simple problem but so far I've been unable to solve it. Here's the situation. I have an eCommerce website that uses a third-party shopping cart. So, the product is listed on www.my-store.com, but the checkout process is completed via www.my-cart.com. I actually own both domains, so I am able to make any changes to either one as necessary. When you click the "add to cart" button on my-store.com, the form post goes to a local page on my-store.com, which performs some actions, and then is forwarded to my-cart.com, which does a few more things and forwards two or three more times. So by the time your browser shows you the next page on the my-cart.com actual checkout process, any hope of keeping the original cookie via GA tracking seems to be lost. My solution for this problem was to add an <iframe> on the checkout pages (each step). The iframe is from my-store.com and contains the GA tracking code. All of that is actually working, and I can track the steps through checkout, see the eCommerce transaction, item purchase, dollar amount, etc. My problem is that if someone adds something to their cart on my-cart.com, and THEN clicks "continue shopping," which takes them back to my-store.com, GA resets the referer to my-cart.com, instead of what it was originally. What I need is a way for GA to ignore my-cart.com as the referrer and keep the original one intact. Is there some magic config I can use in the iframe code or on the shopping cart page itself that tells google not to overwrite the original referrer?

    Note that I am using the current async version of GA (e.g., _gaq.push, etc.).

    Thanks,

    Bill

  2. #2
    Yes, the stock GA code does not work across multiple domains.

    You will need to modify the GA code to make this work. No iframe is necessary.
    Read more here http://code.google.com/apis/analytic...ckingSite.html

  3. #3
    Member
    Join Date
    Oct 2005
    Posts
    60
    I have tried the code that Google suggests. I even had some people at Google look at it and they could not get it to work. Granted, that was about 2 years ago, but basically they seemed to think that because I am using redirects (i.e., php header:location directives), the redirected pages are never actually loaded and hence analytics gets lost. I've seen several threads on this topic and using an iframe was the only way to get around it.

  4. #4
    Ahh, yes it's possible that the redirects are stopping the cookie from passing through.

    Alot can happen in 2 years, i would try it again if i were you.

    Sorry, I can't help much further

  5. #5
    Senior Member NJ's Avatar
    Join Date
    Jul 2006
    Location
    Missoula, Montana
    Posts
    244
    Quote Originally Posted by wdillsmith View Post
    I actually own both domains, so I am able to make any changes to either one as necessary. When you click the "add to cart" button on my-store.com, the form post goes to a local page on my-store.com, which performs some actions, and then is forwarded to my-cart.com, which does a few more things and forwards two or three more times.
    I'm wondering why, if you own both domains, you are using two domains for what functions as one site?
    Putting the world of computers into plain English.
    http://thecomputergal.com

  6. The following user agrees with NJ:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •