Källa: Google Analytics Help: Support.google.com/analytics/
Denna text är en introduktion till domänhantering och på engelska.
When you set up Analytics to track across separate domains, or when you set up Analytics to restrict tracking to a section of your website, you are making adjustments to how Analytics collects visitor data for your web property. To understand this, let’s first look at a default Analytics setup for a site or web property.
By default, Analytics records visits to a given URL as a group. For example, if you set up tracking to your blog — myexample blog.example.com — visits to all pages and subdirectories to your site are collected and tallied as a unit.
That way, when a user goes from one page on your site to another page on that same site, the Analytics reports show the following relationships:
•navigation path between pages
•total time on site—as a cumulation of time on pages
•number of individual sessions and unique sessions (visits)
•number of unique visitors
In addition, Analytics treats visits to separate URLs as unique and unrelated (except for referring links). This is how you would expect Analytics to work, since you would not want visitor data from one website to appear in the Analytics report for a separate, unrelated website.
Without cross-domain customizations, a visitor who first visits your online store and then proceeds to your 3rd-party shopping cart is counted as two separate visitors with two separate visits of different durations, which is not appropriate for this model.
You can, however, use cross-domain tracking to make sure that Analytics records traffic to these two sites to the same report. In web analytics, this is often called site linking. With it, a visitor to your online store who proceeds to your shopping cart is counted as one visitor—not two—and the session they started on the store is continued through to the time spent on the shopping cart.
(This information applies to the ga.js tracking method only)
There are a number of scenarios where cross-domain tracking is useful:
•Your shopping cart software resides on a 3rd-party site or on another domain.
•Your online presence spans multiple sub-domains, and you want a unified report for all visitor data.
•Some of your site content is displayed in an i-frame hosted on another domain.
•You want to track unique areas of your site separately, such as when you want to track a sub-directory separately from the rest of the site.
In these situations, you will need to adjust how Analytics collects data so that traffic to separate domains is collected in a single report.
When you set up tracking across domains, you collect all the useful related data associated between the two websites. You will also be able to learn:
•Which search engines visitors used
Without cross-domain tracking, the reports for your shopping cart will only show your online store website as the main referring site
•The duration of a visit, inclusive of the time spent shopping for items and purchasing
•Which landing pages most contribute to sales or to goal completions?
Custom domain tracking is possible for a variety of situations:
•Subdomains—for tracking all visitors to both dogs.example.com and www.example.com, with data for both showing in the same report view
•Subdirectories—for tracking only visitors to a subdirectory, such as www.example.com/dogs, where the data appears in a separate report as if it were a single site
•Top-level domains—for tracking all visitors to two domains that you own, such as www.example.com andwww.example2.com, with data for both showing in the same report view
•IFramed Content—for tracking visitor and pageview data for content in an iFrame of another domain
For instructions on setting up tracking for these types of configurations, you can read the detailed documentation in Cross-Domain Tracking on Google Code.
Konfigurera Kors-Domän spårning för multipla domäner