Yes, it is possible.
No, it won’t work with a simple “copy-paste” of the two Google Analytics codes.
Read on, if you want to know the solution which I discovered by experimenting! :-)
* * *
Not a long ago I had to play a lot with GoogleAnalytics. I had also the idea of creating one GoogleAnalytics profile for the whole domain, and separate profiles for some of the sections in the website. Thus the statistics for the whole website and its sections could be tracked in an easier way, like if you were watching the statistics for separate websites, while having at the same time an overall look at the traffic for the whole domain. (I believe there are other means of achieving the same goal with GA, but for me the method above was the easiest to implement.)
So, I’ve created separate profiles in Google Analytics (one profile for the whole website and several others for the site sections), copied the HTML codes from GoogleAnalytics on each page, and waited for the results. 24 hours later I discovered that:
1) The first (for the whole domain) GoogleAnalytics profile works and gathers data (the code for it was always first in the html code in the pages).
2) The GA profiles for each section do not work (they show zero traffic), notwithstanding the fact that Google Analytics claims that the GA code is inserted correctly and works (the code for each site section was always after the general profile code).
The things at this moment looked like this:
Copy-pasting the GA codes one after the other didn’t work… After some research and googling around, I’ve found the following solution: