Announcement

Collapse
No announcement yet.

Google Analytics: ♪ Two carts, believing in just one site ♫

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

  • Google Analytics: ♪ Two carts, believing in just one site ♫

    Our company website is:
    http://www.texasmediasystems.com

    Our 3dcart store is set up to appear as a sub-domain of our site:
    http://shop.texasmediasystems.com
    is the same place as
    https://texasmediasystems.3dcartstores.com

    I'm not sure what tracking code I should be using. Code for one domain with multiple subdomains? Code for multiple top-level domains?

    I'm pretty sure that code for multiple subdomains will work, but when people go to checkout, they will be using the 3dcartstores.com domain which is a separate top-level domain.

    From what I understand on this page, I should be able to use this code on all of my pages (both texasmediasystems.com and shop.texasmediasystems.com):
    Code:
    _gaq.push(['_setAccount', 'UA-12345-1']);
    _gaq.push(['_setDomainName', '.example-store.com']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    But it also seems like I need to put this code on the 3dcartstores.com domain pages:
    Code:
    _gaq.push(['_setAccount', 'UA-12345-1']);
    _gaq.push(['_setDomainName', 'none'];);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    I've gone ahead with putting the first code on all pages; I'm not sure how to implement the second bit of code.

    Is this correct? Anyone else in the same position? Is this information helpful or hurtful? :confused:
    Webmaster: Texas Media Systems

  • #2
    Follow Up.

    After more research, I found better clarification. I hope this helps others.

    Here are my sources for those interested. The first is the article in the Google Analytics documentation that I linked to before. The second and third are from the Google Help Forums.
    http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#multipleDomains
    http://www.google.com/support/forum/p/Google+Analytics/thread?tid=7442e78ea1ce2c2b&hl=en
    http://www.google.com/support/forum/p/Google+Analytics/thread?tid=32d50cda9b31ab83&hl=en

    To rephrase my original problem, I have two top level domains and one subdomain that I would like to track via Google Analytics. The problem is that my 3dcart store is on my subdomain, but checkout takes place on a different top-level domain.

    Here's the code I eventually settled on for ALL domains and subdomains:
    Code:
    _gaq.push(['_setAccount', 'UA-12345-1']);
    _gaq.push(['_setDomainName', 'none'];);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    And here's why: though it would be ideal to use '_setDomainName', '.texasmediasystems.com' on all of my pages except for checkout through 3dcart (which would be '_setDomainName', '.3dcartstores.com'), it's too much work. I would have to modify each page template in 3dcart with the correct code instead of a global element. I would also have to change site navigation on checkout to include '_link' or '_linkByPost' when that is handled with global files.

    I first looked into this because I was frustrated by my own site showing up as the top referral in GA's "Traffic Sources" report. Seeing the amount of unnecessary work it would take me to do that, I think I'll just deal with that small annoyance instead.
    Webmaster: Texas Media Systems

    Comment

    Working...
    X