Google Analytics reporting for multilingual e-commerce stores – Part 2
March 8th, 2010 | Published in Google Analytics, Google Conversions
Today we're sharing the second in a series of posts showing you different ways to achieve a similar reporting structure for activities across multiple regions and languages for e-commerce websites.
Method 2: Multiple profiles, multiple domains and a single payment gateway
What happens if you wish to keep reporting for each store separate? How do you track the performance of each store in a different profile when you have a single payment gateway domain?
example multi-store site set up
Note: Our payment gateway uses a sub-directory structure for each corresponding domain. This allows us to install a different Google Analytics tracking code under each sub-directory.
Step 1) Recommended Google Analytics tracking code configuration
- Create a profile in Google Analytics for a new domain for each domain you wish to track
- Use a different tracking code number (UA-XXXXX-Y) for all domains, and customise it to track visits across domains as follows:
Code for all pages in example.com and any subdomains of example.com:
try{
var pageTracker = _gat._getTracker("UA-XXXXX-1");
pageTracker._setDomainName(".example.com");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
} catch(err) {}
Code for all pages in example.es and any subdomains of example.es:
try{
var pageTracker = _gat._getTracker("UA-XXXXX-2");
pageTracker._setDomainName(".example.es");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
} catch(err) {}
Code for all pages in example.fr and any subdomains of example.fr:
try{
var pageTracker = _gat._getTracker("UA-XXXXX-3");
pageTracker._setDomainName(".example.fr");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
} catch(err) {}
Code for all pages in example.co.uk and any subdomains of example.co.uk:
try{
var pageTracker = _gat._getTracker("UA-XXXXX-4");
pageTracker._setDomainName(".example.co.uk");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
} catch(err) {}
Code for all pages in example-payment.com and sub directories:
try{
var pageTracker = _gat._getTracker("UA-XXXXX-Y");
pageTracker._setDomainName(".example-payment.com");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
} catch(err) {}
Note: For each sub-directory on example-payment.com. You will need to change the UA-XXXXX-Y number to correspond to the correct Analytics account. See diagram example multi-store site set up.
Advanced users may wish to use the _setCookiePath() method to prevent cookie information being shared on example-payment.com
Step 2) Call _link() or _linkByPost() in all links and forms between each domain. As per the instructions under step 3.
Step 3) Configure Goal / Funnel Reports
Example: Spain (es) Checkout Complete
Description |
URL |
Name |
Goal |
/es/thank-you |
Spain Checkout Complete |
step 1 |
/add-to-cart |
Add to Cart |
step 2 |
/shipping |
Shipping details |
step 3 |
/es/payment |
Payment |
Repeat step 3 for each profile that needs a Goal Funnel report.
Step 4) Go to your Goal -> Funnel Visualisation report it should look something like this:
In our next post, we'll discuss a third method to achieve a similar reporting overview.
Posted By Gavin Doolan, Google Analytics Team