Roll up reporting is not a standard feature in Google Analytics. However with a little extra coding, you can have stand alone reports for specific i.e. product dedicated websites, and a roll-up report to give a global overview.
Generally, this issue mostly effects enterprise clients. For example, companies with brand specific or product specific web sites targeted at particular markets. Because of this specific need it makes sense to have separate, stand alone Google Analytics accounts for each web site. That way, segmentation, referral analysis, e-commerce revenue (or lead generation) can be analyzed in detail.
However, Marketing Managers also need a high level overview of how the entire online channel is performing. This is when having separate GA accounts can become laborious. Roll-up reporting simplifies this. That is, in addition to individual Google Analytics accounts, you also have a single “catch-all” account with all data from all web sites aggregated. This post shows you how to do this and has been successfully deployed by clients such as Unicef, Baby Bjorn, Stena Line and Macmillan Publishing.
What exactly is the advantage of this approach compared to using a single profile and then creating additional sub-profiles for each site?
For enterprise clients I generally come across the scenario where the client has semi-autonomous country offices who wish to âplayâ (segment, filter, open up access to their agency) with their own specific data. The HQ requires a global overview but wish to leave the country/region details to the local office. In fact, they generally wish to leave all training, support and management of analytics to their local office – HQ provides the implementation.
To ensure HQ receives its global overview with confidence in its data integrity, it is better that they maintain their own GA account with access restrictions and change history documentation in place. Country offices can then do as they wish.
Roll-up reporting setup
The principal to roll-up reporting is straight forward – you add multiple Google Analytics Tracking Codes (GATCs) to your web pages. One specifies the individual account, the other is for the roll-up account. Schematically this is shown below for two websites:
[js]
[/js]
The actual JavaScript is as follows:
[js]
[/js]
Note, for each stand alone web site, you use your specific GATC i.e. change the UA-123456-1 to match each of your Google Analytics accounts. Below this, you add the same same roll-up account information. The rollup part of the GATC remains the same for each site. In this case UA-987654-1. Obviously you will need to change the UA numbers for your account(s).
E-Commerce
Special consideration is required for e-commerce transactions because you will need to call the e-commerce tracking code for each account. So _addTrans, _addItem and _trackTrans are required for firstTracker and secondTracker objects. Schematically you need to add the following on your transaction receipt/confirmation page (view the Help Centre if you need general e-commerce tracking help):
[js]
firstTracker._addTrans(enter transaction values as array);
firstTracker._addItem(enter item values as an array);
firstTracker._trackTrans();
secondTracker._addTrans(enter transaction values as array);
secondTracker._addItem(enter item values as an array);
secondTracker._trackTrans();
[/js]
And that’s it… except…
Roll-up implications
It is important you are aware of the ramifications of rolling up data from different websites into one Google Analytics account:
- Pageview aggregation
Pageviews in your different websites that have the same page title or name (for example index.htm, contact.htm etc.) will be aggregated. That is you will only see one entry for index.htm and for contact.htm etc., with the sum of their pageviews. Generally for roll-up reporting that is not a problem as this account is used to get the “big picture” aggregate overview. However, if you still need the page name detail, apply the filter described in the following Help Centre – its the same filter for differentiating pageviews from sub-domains . - transaction in different currencies
Similar to pageview aggregation, e-commerce data will be aggregated. That is, if you have transactions in different currencies the revenue totals become meaningless at the roll-up level. So pounds, dollars, euros are all be combined regardless of exchange rates. Therefore, for your roll-up account, unify your transaction data into a single “base” currency. This base currency should remain fixed so that long term comparisons can be made i.e. don’t change this to reflect currency exchange rates. - Timezone alignment
If your stand alone accounts operate in different timezones, ignore time of day reports in the roll-up account. They won’t make sense! - AdWords ROI in different currencies
If you run AdWords accounts in different currencies for your stand alone Google Analytics account, ignore the ROI and margin metrics from the ‘Clicks’ report. - Cookie manipulation
The roll-up report method described in this post results in cookies being shared between both of your Google Analytics accounts. Therefore any cookie manipulation on one (changing time out values, expiry date for example), results in changes impacting both sets of reports. This issue can arise for example if you have an agency collecting data for its own internal purposes (stand alone account) as well as for you (global account). They may wish to experiment, not realising the wider impact – I have seen this happen and a great deal of time and money was wasted trying to figure out what was going on!
These implications may sound daunting but in many cases they are not. Apart from unifying your e-commerce data, you probably will not drill down deep enough in a roll-up report for these implications to be noticed.
Improvement tip
This hack improves the pageview aggregation implication described above (item 1).
If you have dozens or even hundreds of product micro sites, you may wish to simplify pageview reports even further. Rather than collecting detail of every single page on each micro site into the rollup account, you can concertina this in to a “per site view”. That is, rollup pageviews.
In this way, instead of having pageA = 3 views, pageB = 2 views, pageC = 1 view etc., you would have pageview for www.mysite.co.uk = 6, www.mysite.com = 13 etc. This simplifies the Top Content report, so that you see overall pageview volumes on a per site basis.
The following GATC modification can be used for simplifying pageview reports:
[js]
[/js]
The highlighted line replaces the pageview name (URI) with the name of the website.
Please let me know if you found this article useful. A quick rating (click the stars) is the fastest way, though as always comments are my main KPIs.
Hi Brian
Love your blog, books and G+ contributions. You tought me a lot!
But I think you need to do some SEO for this page. I spent hours searching on “analytics multiple accounts eccomerce tracking” before I found it.
Ask Per, maybe he can help you with titles and stuff ; )
Anyway, I am happy I found it because I have a case with some 20 different domains with their own Analytics-accounts and we have created a Master-account where we also push in data in order to be able to create overview reports.
These are not ecommerce websites, but they use ecommerce to register data regarding specific requests from clients.
Thing is, we havenÂŽt been able to get ecommerce data to show up in the Master-account (_gaq.push([‘b._setAccount’, ‘UA-XXXXXXX-1’]);).
I see you provide a solution here, but your post is somewhat old and use the old tracking code.
Does the same method work also for asynchronous code you think?
I checked your book on the topic also, but couldnÂŽt find an answer quickly.
Cheers!
Hi,
As alluded to in previous posts, roll up reporting hack does not appear to be a good solution for e-commerce tracking globally, as invariably you are dealing with subdomain and cross domain tracking which I believe I am right in saying can have implications on cookie setting if used in conjunction with a roll up hack. Therefore seems that one account for all global e-commerce sites and a show domain filter in GA to create filtered profiles is the best option as then you can accurately measure a visitor across their e-commerce and payment journey.
Let me know if you think there is a better way?
@David – as long as the cookie settings in both tracker objects are the same, you will be fine with this technique. Of course currencies need to match if revenue is an important roll-up metric. See Chapter 9 of the book.
You can achieve the same with your approach – its not right or wrong, just different. Which solution best meets your needs is really based on how your organisation is setup and its corresponding website architecture. The technique I describe is aimed at a certain type of organisation i.e. one with distributed, semi autonomous offices/websites.
HTH, Brian
Re: SOnal’s Post – We are getting the same unequal totals…it seems there are certain pages of some of our sites that the rollup account ignores completely…even though the tracking code is injected exactly the same as on all the other pages. And even on smaller/simpler sites…the stats never add up exactly between the two. Is it unreasonable to expect that? Is there a number of things that could throw this off? If so, what? I can’t seem to find articles/blogs on this matter accept for your question. Any help/explanation would be much appreciated.
Great post!! I have a question,I have generated a roll up report for 10 website. Is there any way to understand if the implementation is done properly or not??
If I add the views of these 10 websites manually the sum is not equal to the views which is given in the roll up report??is this okk??
Thanks
@Sonal: This roll-up technique is for semi-autonomous website/offices where it is highly unlikely a visitor will traverse across the different domains. Is that the same for you?
Great post!! had a question, how to understand which websites are measurecd in google analytics roll up report? Is there any option in the report which gives the list of website it is tracking?
Does anyone know if this works for a third level report eg
1) Individual Audi dealer website
2) Global Roll up account for all Audi Websites
3) Global Roll up account for all Manufacturer websites (Audi, Ford, Hyundai etc)
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-AAAAAAAA-1’]), //individual market account
_gaq.push([‘_trackPageview’]),
_gaq.push([‘b._setAccount’, ‘UA-BBBBBBBB-1’]), //global rollup account for AUdi websites
_gaq.push([‘b._trackPageview’]);
_gaq.push([‘b._setAccount’, ‘UA-CCCCCCCC-1’]), //global rollup account for all manufacturer websites
_gaq.push([‘b._trackPageview’]);
(function() {
var ga = document.createElement(âscriptâ); ga.type = âtext/javascriptâ; ga.async = true;
ga.src = (âhttps:â == document.location.protocol ? âhttps://sslâ : âhttp://wwwâ) + â.google-analytics.com/ga.jsâ;
var s = document.getElementsByTagName(âscriptâ)[0]; s.parentNode.insertBefore(ga, s);
})();
Rory: There is no limit to the number of times you can add tracker objects (FWIW, the max I have worked with is 4). Your logic looks good, but the last call should be preceded by “c.”
> We don’t want to create a new account and want to use the existing
account to create a roll up report. Is it possible without disturbing the current structure of the account? i can I keep ,both roll up report and usual reports?
Hi Brian
I have been trying alot of varents on the roll up code and so far none have worked. I am trying to roll up 3 accounts,changing the UA-AAAAAAAA-1 to the individual accounts UA but keeping UA-XXXXXXXX-1 the same on all 3 sites.
Could you please have a look at the code below and let me what I am doing wrong.
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-AAAAAAAA-1’]), //individual market account
_gaq.push([‘_trackPageview’]),
_gaq.push([‘RollUp._setAccount’, ‘UA-XXXXXXXX-1’]), //global rollup account
_gaq.push([‘RollUp._trackPageview’]);
(function() {
var ga = document.createElement(âscriptâ); ga.type = âtext/javascriptâ; ga.async = true;
ga.src = (âhttps:â == document.location.protocol ? âhttps://sslâ : âhttp://wwwâ) + â.google-analytics.com/ga.jsâ;
var s = document.getElementsByTagName(âscriptâ)[0]; s.parentNode.insertBefore(ga, s);
})();
Hi Brian
sorry, you are right, i read it wrong as the cookie manipulation part is talking about cookie for two GA accounts..
Anyway as a thought on Roll-up setup, could you share some thoughts on my setup?
http://www.webnation.co.nz/blog/google-analytics-account-structure-enterprise-user-setup
Jeffrey: This is a roll-up reporting technique. It is not intended to track visitors that *traverse* different sites.
For tracking visitors across different domains you need to “link” between sites so that cookies are handed over to the receiving site. This is covered in Ch 7 of the book “Advanced Implementation”.
the cookie part is simply wrong,
based on your set up, domain a.com and domain b.com will have different GA cookies for unique visitors, because just because you are using the same profile ID doesn’t mean the cookies are shared.
refer to:http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html
and
http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html
Is this works?
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-AAAAAAAA-1’]), //individual market account
_gaq.push([‘_trackPageview’]),
_gaq.push([‘b._setAccount’, ‘UA-BBBBBBBB-1’]), //global rollup account
_gaq.push([‘b._trackPageview’]);
(function() {
var ga = document.createElement(âscriptâ); ga.type = âtext/javascriptâ; ga.async = true;
ga.src = (âhttps:â == document.location.protocol ? âhttps://sslâ : âhttp://wwwâ) + â.google-analytics.com/ga.jsâ;
var s = document.getElementsByTagName(âscriptâ)[0]; s.parentNode.insertBefore(ga, s);
})();
Thanks Alex! This appears to be working for me. I’m getting my roll up data in one account and individual site data in the other.
Actually, reading a bit further on the subject of “One Push, Multiple Commands” http://bit.ly/bjsZE8 it looks like the correct version should be…
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-AAAAAAAA-1’]), //individual market account
_gaq.push([‘_trackPageview’]),
_gaq.push([‘b._setAccount’, ‘UA-BBBBBBBB-1’]), //global rollup account
_gaq.push([‘b._trackPageview’]);
(function() {
var ga = document.createElement(âscriptâ); ga.type = âtext/javascriptâ; ga.async = true;
ga.src = (âhttps:â == document.location.protocol ? âhttps://sslâ : âhttp://wwwâ) + â.google-analytics.com/ga.jsâ;
var s = document.getElementsByTagName(âscriptâ)[0]; s.parentNode.insertBefore(ga, s);
})();
Alex: I don’t have an official update to this post (yet!), but _gaq.push([‘b._trackPageview’]); syntax looks correct to me.
Hi Brian,
Great work on the new edition of the book.
The question I have is similar to Sergey’s & Zach’s.
The new GA code looks a little different to the example shown in the original post and I wanted to double-check the syntax for roll-up reporting below works.
var _gaq = _gaq || [];
//individual market account
_gaq.push([‘_setAccount’, ‘UA-AAAAAAAA-1’]);
_gaq.push([‘_trackPageview’]);
//global rollup account
_gaq.push([‘_setAccount’, ‘UA-BBBBBBBB-1’]);
_gaq.push([‘_trackPageview’]);
(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();
Thanks for your help in advance!
I believe I just found the answer to my question. I think it would look something like this:
var _gaq = _gaq || [];
//rollup account
_gaq.push([‘_setAccount’, ‘UA-XXXXXXXX-1’]);
_gaq.push([‘_setDomainName’, ‘none’]);
_gaq.push([‘_setAllowLinker’, true]);
_gaq.push([‘_trackPageview’]);
//single domain account
_gaq.push([‘t2._setAccount’, ‘UA-YYYYYYY-1’]);
_gaq.push([‘t2._setDomainName’, ‘.mydomain.com’]);
_gaq.push([‘t2._trackPageview’]);
Has anyone got any tips/guides on how to do rollup reporting in GA using the new asynchronous tracking code?
Hi,
I have set up rollup profiles for my sites. But there is a mismatch between the data of Individual and roll up profiles. Though the difference between the individual and rollup account for a page is maximum 10 per day..The problem arises when we gather data for over a period of time.
Im using the regex you mention in this post
Filter Type: Custom filter > Advanced
Field A: Hostname
Extract A: (.*)
Field B: Request URI
Extract B: (.*)
Output To: Request URI
Constructor: $A1$B1
This allows me to see my sub domain which is good. However this also has the effect that I now see www. which is logical since it’s a sub domain. My question. Is there a way to filter out the www so it reports together with the non-www site.
Hi Brian, really helpful post. I’m utilizing the code you’ve supplied for tracking a country and a global account with the modification that can be used to simplify reports. When tracking multiple top level domains, Google recommends adding the following code snippets. Should we add the following code beneath var Firsttracker and var secondtracker?
pageTracker._setDomainName(“none”);
pageTracker._setAllowLinker(true);
Ryan: The use of _setDomainName and _setAllowLinker are for tracking visitors that cross over between domains i.e. support.mysite.com and blog.mysite.com. If that is your scenario then this method of roll-up reporting is not for you (aimed at semi autonomous offices with separate sites). E-nor posted a GATC method for doing this: http://analytics.blogspot.com/2009/09/advanced-structure-your-account-with.html
Thanks Brian, great post! I’ve implemented this across a few sites, and I’m a little unsure as to how to interpret the Absolute Unique Visitor data.
Will the roll up be able to de-dupe visitors across the different domains included within it?
e.g. If one visitor browses 4 of our sites in a day, will they be counted as 4 unique visitors, or 1 unique visitor in the roll up?
Is there an issue with cookies preventing this from happening?
Any info would be greatly appreciated!
Jon: The method for roll-up reporting I describe is not suitable for your situation – it is aimed at organisations that have autonomous offices/websites.
For visitors that can traverse different websites, you need to use the methods described in Ch7 of the book, Advanced Implementation. Essentially you hand over cookies from one domain to another (using _link or _linkByPost functions) so that the session information is preserved. That way, the uniqueness is also preserved.
BTW, this post from me is also relevant for you: http://www.advanced-web-metrics.com/blog/2009/02/11/why-counting-uniques-is-meaningless. It doesn’t mean don’t use ‘uniques’ in your KPI mix, rather use them in context i.e. don’t give a lot of weight to them.
Great info! I have a question:How can different events (through ajax requests) in a page be used to create a consolidated report? For example, there are three events (ajax requests) that we want to rollup based on a day and give the metrics for all the three events on the columns. Not sure if the question is clear; if not I can further explain. Help in this regard would greatly help!!
Parthi: I don’t think your question relates to this post on roll-up reporting. It sounds like you with to group your ‘actions’ into ‘categories’. Event tracking can do this for you. You will need to plan the hierarchy of your events and then use the category label of the _trackEvent call.
The current book is a little out of date now on Event Tracking as it was only just in beta when written. The new edition is much more clear on this. Stay tuned…
Great information! It seems like I learn something new everyday with regard to Google Analytics. Learning how to track the information in more granular ways definitely adds value to the information received.
Great post! Two things:
– Roll-up reporting is hitting the big time with a post on the official blog: http://analytics.blogspot.com/2009/09/advanced-structure-your-account-with.html
– Re: simplifying pageview aggregation — seems like a great fix, but rather permanent. Is there a way to do this via filters on a specific profile in your roll-up account?
The post is nice.
This is new thing to learn in Google Analytics.
Thanks
Hi, Brian,
reading you book atm. Since it was published GATC seems to have changed a bit. Now it looks more like:
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
try {
var pageTracker = _gat._getTracker(“UA-########-#”);
pageTracker._trackPageview();
} catch(err) {}
Is it the right way to setup tracking for multiple accounts?
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
try {
var firstTracker = _gat._getTracker(“UA-########-#”);
pageTracker._trackPageview();
var secondTracker = _gat._getTracker(“UA-########-#”);
pageTracker._trackPageview();
} catch(err) {}
Sergey: yes you are correct. Look out for the second edition of the coming in early 2010… đ
Hi Brian,
This has been a big help in seeting our roll up accounts. We will be implementing this very soon on our websites. Just a quick question: Do you see any impact in website performance due to this multiple track code?
Thanks,
Vishal
Vishal: there is no additional performance impact of using this code as the ga.js file is only loaded once – no matter how many times you call pageTracker.
Great Post! This is a much better solution than the usual multi-filter method to separate individual website data.
Hi Brian,
I have an enterprise client with GA accounts set up for 5 currencies ($US, GBP, $CA, $AUS, EUR), which track into a roll-up account (in GBP). Is it possible to apply a pre-defined exchange rate (e.g. ÂŁ1 always equals $1.4) so that the second trackers translate the $/EUR figure, etc, into GBP for the roll up report. Hope that makes sense.
Thanks, Sam
Very interesting article: I am dealing with a couple of enterprise customers who have several sites and a roll-up report is required. But what exactly is the advantage of this ‘double tagging’ approach, compared to using 1 single GA profile tag – and then creating additional sub-profiles for each site, using a filter based on host name ?
Luc: Good question – this should be made clearer in my original post…
For enterprise clients I generally come across the scenario where the client has semi-autonomous country offices who wish to “play” (segment, filter, open up access to their agency) with their own specific data. The HQ requires a global overview but wish to leave the country/region details to the local office. In fact, they generally wish to leave all training, support and management of analytics to their local office – HQ provides the implementation.
To ensure HQ receives its global overview with confidence in its data integrity, it is better that they maintain their own GA account with access restrictions and change history documentation in place. Country offices can then do as they wish.
Finally, using multiple accounts allows you to overcome the 50 profile limit per account.
HTH.
Emiel: Thanks for the heads up – its actually a bug in WordPress. If I edit a post containing sample code it must be done in HTML view. The wysiwyg editor messes the code and effectively wipes it..!
Hi Brian, As usual very interesting post.. There is only one but, I don’t see the modifications I just see;
Doesn’t Google disregard tracking multiple domains with one GA account. See the last paragraph – http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html
Jay: Your reference is correct. However that is not connected to this hack.
Dear Brian,
Thank you for your book âAdvanced Web Metrics with Google Analyticsâ, we expect itâs translation into Russian to be greatly useful for our colleagues. In Russia Web Analytics is not widely used yet.
The conference â?ybernetics and Businessâ is the most large-scale in Russia (5963 participants are registered at the moment, while the registration will be continued for a week http://ok2009.ru/participants/). Dmitry Medvedev, Russian president, visited it last year.
Some best Russian experts are to make their reports at the conference on the subject âThe usage of web-analytics data for increasing sales of an online-shopâ (http://ok2009.ru/program2/58/).
We would be glad if you agreed to be a reporter at the conference (on-line via skype or personally). It will be quite soon, though the date and time are not fixed yet. Anyway, any your report to the audience, including the announcement of the Russian translation jf the âAdvanced Web Metrics with Google Analyticsâ will be discussed at the section.
A Russian association of Web Analysts is likely to take itâs origin at this section.
Alexey Yakovlev, the author of two popular Russian-language books on site promotion and context advertising, the leader of the well-known in Russia project http://www.seo-study.ru/, organizes free on-line seminars at http://www.onlinesem.ru/.
For example, a series of seminars is to take place soon. The seminars are devoted to the problems of usage of Google products and are supported by Google-Russia Company (http://www.onlinesem.ru/google.php). A seminar âTracking with Google Analyticsâ will take place on 24 June 2009. Every participant would welcome you to take part in the seminar. If you would choose to make the report via Internet, Alexey Yakovlev could organize the translation into Russian.
We hope that you will accept our offer.
Once again thank you for your book.
Mihail
Hi Brian
I have implemented this on a group of sites that we run and am loving the insightful reports that I can gain. Thanks for this one.
Nikki
Hi Brian,
I have a quick question for you and I’m not sure where to put it, so I thought I’d leave it here.
How would I set up a filter that would distinguish Google Product Search referrals or plain old Google Organic?
Its a bit unclear what the specific URL Referral is of a product search link, but I am pretty sure it is just getting counted as organic.
I am in a situation where it would not be simple to tag all product feed links with ?utm_source parameters, so hopefully a filter will help me out here.
Thanks!
Eric
Andre: Well spotted and corrected. Many thanks.
Hi Brian, you have to leave out the quotes around location.host đ Thanks for the idea though, great way to do roll-up reporting.
Jared: Thanks for the feedback and good point for extending location.host method.
Manuel: As cookies are being shared only one instance of setVar can be used.
On a related note, if the site is running any kind of extension script to track downloads, outbound clicks, etc… or events, they will need to have those scripts also run the second tracker if they want to roll-up that data. Thanks to Caleb of AnalyticsPros for pointing this out.
Hi Brian,
thanks for your explanation, great! like always.
Just, one question. It would be possible to use a different setVar for each tracker? Thanks.
Regards
Great post; very straightforward. Clients ask us for this type of customization all the time.
On the aggregating pageviews point, it’s also possible to use secondTracker._trackPageview(location.host+location.pathname) rather than creating a filter to differentiate the pages.