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 ( 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.


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', '']);

here's an easy tool to help

here's more details for your developer

Answered 9 years ago

Hi, you should use one property with the same UA number on both www and subdomain pages. Enable ecommerce tracking from the profile settings.

Here's the best article on subdomain tracking I've found so far:

Answered 9 years ago

Enable e-commerce for the main profile. If the sub domain is part of the current main site, you should not have to do any cross-domain tracking either.

Answered 9 years ago

Unlock Startups Unlimited

Access 20,000+ Startup Experts, 650+ masterclass videos, 1,000+ in-depth guides, and all the software tools you need to launch and grow quickly.

Already a member? Sign in

Copyright © 2022 LLC. All rights reserved.