Google Conversion Room Blog Tips on tracking and improving conversions online

Google Analytics reporting for multilingual e-commerce stores - Part 3

Wednesday 10 March 2010 | 10:48

Labels:

Today we're sharing the last in a series of 3 posts showing you different ways to achieve a similar reporting overview for activities across multiple regions and languages for e-commerce websites.

Method 3: Roll up reporting, multiple domains and a single payment gateway

Say you have several domain names, one per country eg: example.com, example.es, example.fr, example.co.uk, but all of these websites use a common payment gateway example-payment.com.

How do you track the performance of all stores in a single account (profile) whilst being able to report on important metrics, such as revenue, or reports like goal conversion funnel visibility for each store?




Step 1) Recommended Google Analytics Tracking code configuration

1. Create a single Google Analytics profile to track all domains

2. Use the same tracking code number (UA-XXXXX-X) for all dom
ains, and customise it to track visits across domains see below.

3. Call
_setCustomVar() at visitor level scope and populate with store information for each language domain but not your payment gateway domain.

Note: By setting the custom variable at the visitor level on your store domains, you can track the visitors originally visited store information in the _utmv cookie. This value is then able to be passed between domains using cross domain tracking in step 2).

Code for all pages in example.com and any subdomains of example.com:


<script type="text/javascript">

try{
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setDomainName("
.example.com");

pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._setCustomVar(1, "store", "us", 2);
pageTracker._trackPageview();
} catch(err) {}

</script>


Code for all pages in example.es and any subdomains of example.es:

<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setDomainName(".example.es");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._setCustomVar(1, "store", "es", 2);
pageTracker._trackPageview();
} catch(err) {}
</script>

Code for all pages in example.fr and any subdomains of example.fr:

<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setDomainName(".example.fr");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._setCustomVar(1, "store", "fr", 2);
pageTracker._trackPageview();
} catch(err) {}
</script>

Code for all pages in example.co.uk and any subdomains of example.co.uk:

<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setDomainName(".example.co.uk");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._setCustomVar(1, "store", "uk", 2);
pageTracker._trackPageview();
} catch(err) {}
</script>

Code for all pages in example-payment.com and any subdomains of example-payment.com

<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setDomainName(".example-payment.com");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
if (pageTracker._getVisitorCustomVar(1) != undefined) {
var langPath = '/' + pageTracker._getVisitorCustomV
ar(1) + location.pathname;
pageTracker._trackPageview(langPath);
}
else {

pageTracker._trackPageview();
}

} catch(err) {}
</script>


Step 2) Call _link() or _linkByPost() in all links and forms between each domain, as per the standard cross domain instructions under step 3.

Tracking code example-payment.com explained:

<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setDomainName(".example-payment.com");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);

The first part of the tracking code is consistent with the other domains. However notice that we do not call the _setCustomVar() method this time.

If we did set a custom variable on the example-payment.com domain, it would override the previously set custom variable for each of your store domains.

if (pageTracker._getVisitorCustomVar(1) != undefined) {

Using an if statement, we check that the returned variable is not equal to
undefined. The _getVisitorCustomVar() method accepts an argument, which is the index we stored our custom variable in during our tracking code customisation. In our example the index is equal to 1.

Hence if we used slot #2 and we called:

pageTracker._setCustomVar(2, "store", "es", 2);

We would need to call:

pageTracker._getVisitorCustomVar(2);

To return the desired value
es.

Next we define a custom variable langPath:

var langPath = '/' + pageTracker._getVisitorCustomVar(1) + location.pathname;

We prefix the value with a forward slash '/' then we obtain the value in the custom variable pageTracker._getVisitorCustomVar(1). Next we call the location.pathname which will return the relative URL on our example-payment.com domain.

pageTracker._trackPageview(langPath);
}

We then pass the langPath value into our _trackPageview() method. So if the relative URL on our payment domain was /payment it would now become /es/payment as far as Google Analytics is concerned.

else {
pageTracker._trackPageview();
</script>

Finally, if for some reason our custom variable is not set or is
undefined, we will still track the visit and pageview on the payment domain example-payment.com, but it will default to the normal relative URL path eg: /payment and won't be prefixed with a language value.

This modification makes our Goal / Funnel set up a breeze later on.


Step 3) View revenue metrics per store

Once you have completed
step 1) and step 2), go to the Visitors -> Customised Variables -> Store report. Select the e-commerce tab.



You should now get a performance break down for each of your stores, showing visits, revenue, transactions, average value, conversion rate and per visit value.

Note: If different languages / domains use different currencies, your Google Analytics profile can only be set to 1 currency type at a time, so you will need to convert all transactions to the same base currency.

Google Analytics does not perform any currency conversions for you. The currency setting will simply prefix the numeric revenue values with the appropriate currency
symbol.


Step 4) Goal Funnel Reports

View your conversion funnel performance for each store / domain when the same URL structure is used, but the initial funnel steps take place on different domains such as that shown in the diagram below:



We will
need to add a filter (see step 4) to expose the hostname in Google Analytics.


Step 4a) Create a duplicate profile (profile for an existing domain)
Give this Profile a name such as "Goal / Funnel Reports". You will now have something like this:



Step 4b) Create the following filter and apply it to your "Goal / Funnel Reports" profile.

Note: We create a second profile because it's generally good practice to have a "raw" or unfiltered profile in your Google Analytics account. Filters permanently alter the data that gets stored in your profile. Therefore the unfiltered profile can be viewed as a backup of your Google Analytics data.

Our Content reports will now have the hostname (
domain name) prepended to them like so:


Note: This filter is also useful if you are using sub-domains.


Step 4c) Configure goal / funnel reports

We now configure our goal/funnel reports by entering the full URL including hostname into the respective fields.

Also keep in mind we override the payment domain URL with our language prefix in
step 1) with our custom tracking code set up.

Example: Spain (es) Checkout Complete

Important! check the required step box





Description
URL
Name
Goal
www.example-payment.com/es/thank-you
Spain Checkout Complete
step 1
www.example.es/add-to-cart
add to cart
step 2
www.example.es/shipping
shipping details
step 3
www.example-payment.com/es/payment
payment

Repeat step 4c) for each individual store that needs a Goal Funnel report.

Step 5) Go to your Goal -> Funnel Visualisation reports to see an overview of each of your goals performance by store.
It should look something like this:




Summary


The following table is designed to help get an overview of each technique:


Structure AttributesMethod 1Method 2Method 3
Complexity
Simple
Intermediate
Complex
Goal/funnel setupAs normal
As Normal
Complex
Tracking code customisation
Minimal (only e-commerce receipt page)
Complex
Complex
Filters required
No
No
Yes
Roll-up reporting
Yes
No
Yes
Custom reporting Required?
To split revenue
No
No
Advanced segments Required?
To split revenue
No
To split site traffic
Custom variable slot
No
No
1 slot required
e-commerce currency
Only 1 currency possible
Unique currency for each profile
Only 1 currency possible
Timezones
Only 1 Timezone for all languages
Unique timezone for each profile
Only 1 Timezone for all languages / domains
Report sampling
More likely due to roll up structure
Less Likely
More likely due to roll up structure


Each technique has its own pro's and con's. The examples is this series are intended to provide an overview of the different ways you can configure Google Analytics to achieve your reporting goals. Your reporting needs may vary and as a result may require further customisations.

If you have specific reporting needs, account structure or customisation requirements not covered in the above article, we highly recommend contacting a
Google Analytics Authorised Consultant for additional help.


7 comments:

matt.wilkinson said...

All very well.. but still no multiple currency option, which if your taking payments in three curencies as we are, this is not that helpful.

Mike said...

You can always send data from each currency specific store to a separate profile code, as well as a global roll-up. The global rollup would be useful for aggregating everything without a currency. You'd have currency totals at each of the profiles.

dvdroest said...

I have to agree with Matt here in that these e-commerce tracking tutorials are pretty nice, but what we really need is more flexibility in e-commerce tracking such as multiple currency support, the ability to show product views as well as purchases, etc.

That together with the possibility of creating a filtered report based on custom variables would allow a lot more flexibility already.

However, one possibility of solving the currency issue is by creating your own currency conversion method which uses the daily conversion rate between the actual and the reporting currency.

This in fact is how other tools (e.g. Omniture) do it, they take the local currency and convert it into the currency used for reporting at the time it is recorded.

To be able to re-calculate the actual local currency (for offline / excel reporting) you can store the conversion rate in a custom variable as well.

So the difference is that you will need to do the conversion yourself, and you will need a custom variable to re-calculate the local currency value.

Hope this helps!

Term Papers said...

I have been visiting various blogs for my term papers writing research. I have found your blog to be quite useful. Keep updating your blog with valuable information... Regards

R4i said...

That together with the possibility of creating a filtered report based on custom variables would allow a lot more flexibility already.

gift idea said...

The best personalised gift shop on the web.We provide great wedding gitfs,birthday gifts,anniversary gift,christmas gifts and unique gift idea for women,men,children and baby.

kate79502 said...

Your blog is really helps for my search and i really like it.. Thanks a lot..:)
Term Papers Writing Services