Sitemaps

Questions

Google Analytics

How to setup ecommerce tracking in Google Analytics if ecommerce platform is setup on subdomain?

Ok, so here's the situation. The main marketing site is WordPress setup on the main www domain, so I have the main Google Analytics profile setup for this. But, our client portal that processes orders, is setup on a sub-domain (portal.domain.com). To setup ecommerce tracking in Google Analytics, should I setup a new profile under the main domain profile, and use the new UA number to track ecommerce - OR - should we enable ecommerce for the main profile? Would appreciate your input.

Answer This Question

3

Answers

Beach Boy

SEO Entrepreneur

always save the original profile as a backup.

that said, this is an easy problem to solve. you just need to use this line of code above the "trackpageview" line....
_gaq.push(['_setDomainName', 'example.com']);

here's an easy tool to help http://gaconfig.com/one-domain-with-subdomains/

here's more details for your developer https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite

Answered over 11 years ago