How does Google Analytics work for multiple domains?

How does Google Analytics work for multiple domains?

As mentioned above, a default setup of Google Analytics is designed to track content and visitor data for a single domain, such as www.example.com. This means that even if you manage both a domain and a sub-domain, you must make modifications to the tracking code in order to share visitor data across both domains.

When do you need to track sub directories of a domain?

In a standard tracking setup for a website, user, traffic, and content data is associated with a single domain, including any traffic to sub-directories. However, it is often the case that you only want to track (or have access to) a sub-directory of a domain. Following are two common examples:

How to restrict tracking to a sub-directory?

In order to restrict tracking to a sub-directory of a website, you must define it as a separate entity by means of cookies. Since a cookie is uniquely defined by a combination of the domain and the path, you can set the path of the cookie to your sub-directory in order to separate tracking to your section of the website.

How are dogtoys.example.com referrals counted in analytics?

In this scenario, sessions via a link from dogtoys.example.com to www.example.com will be counted as referrals. In addition, suppose some of your customers reach dogtoys.example.com from an Google Ads link, and visit the site repeatedly, before finally completing their purchase on www.example.com.

What does cross domain tracking do for analytics?

Cross-domain tracking makes it possible for Analytics to see sessions on two related sites (such as an ecommerce site and a separate shopping cart site) as a single session. This is sometimes called site linking.

What is the tracking code for Google Analytics?

If you have updated your Google Analytics interface to Universal Analytics but you’re still using the old code, you should follow the recommendations for the old (ga.js / doubleclick.js) tracking code here. Tracking IDs are the unique codes that you’re given when you create a Google Analytics property, and look something like “UA-123456-1”.

Where does Google Analytics look for a cookie?

This should always be set to your domain without any subdomain – e.g. moz.com, distilled.net – not www.moz.com or www.distilled.net. By default, Google Analytics looks for a cookie on the same domain as the page. If it doesn’t find one, it assumes that a new visit has just begun, and starts a new session.

How to treat analytics as the same page?

Even though www.example.com/ may be the same page as www.example.com/index.html, they show up as two separate entries in your reports. You can configure Analytics to treat them as the same page by defining the Default page for your site: Navigate to the desired account, property, and view.

Can a view include data from multiple domains?

Any view that includes data from multiple domains or subdomains runs the risk of aggregating data from multiple pages and considering them the same page.

How to spot duplicate URLs in Google Analytics?

When viewing your Site Content URL report in Google Analytics (GA), you can spot the places that have two versions of the same URL, one with and one without a trailing slash. Take this example: this URL, http://www.citychiconline.com/new-in, and this URL, http://www.citychiconline.com/new-in/, both display the same page.

Can you have more than one Google Analytics account?

Managing these two dimensions correctly can greatly simplify collaboration with other actors that need to access some analytics of some of the sites.” Since Google allows you to have up to 50 properties in one account, this is the simplest option for tracking multiple sites.

How to untangle Google Analytics cross domain tracking?

In Google Tag Manager, the first step is quite simple. You just need to set the following field: Then, go to your Google Analytics Admin section and find the referral exclusions under tracking info: Navigate to Referral Exclusions in your Google Analytics Admin. Then, just make sure your root domain is excluded.

How to set up cross domain measurement in Google Analytics?

For your Universal Analytics property, you configured cross-domain measurement via code (either in the source code through analytics.js or gtag.js, or via Google Tag Manager ). For your Google Analytics 4 property, you’ll do this via the Admin page.

How do I add a website to Google Analytics?

Log in to your Analytics account and go to “Admin” menu. Click on the dropdown under “Account” section and then click on “Create new account” option. Provide your account name and website URL and all other details. Click on the “Get Tracking ID” button to generate a new tracking code.

Why is Google Analytics not tracking subdomains?

By default, Google Analytics is not set up with cross-subdomain tracking. As a result, website owners will not have an accurate picture of how a user moved across subdomains and the root domain.

What do tracking IDs mean on Google Analytics?

Tracking IDs are the unique codes that you’re given when you create a Google Analytics property, and look something like “UA-123456-1”. Any page with that tracking ID, regardless of the site it’s on, will send data to that property.

Is the domain name included in analytics report?

By default, Analytics only includes the page path and page name, not the domains name. For example, you might see your pages appear in the Site Content report like this: Because the domain names aren’t listed, it might be hard to tell which domain each page belongs to.

When do you need to track multiple domains?

Another common tracking scenario is to track visitor and traffic data between a single domain and a sub-directory of a different domain. This might occur when you want to track traffic between your website and your online blog, where your blog is limited to a sub-directory of the blog service.

How to get domain names to appear in reports?

To get the domain names to appear in your reports you need to do two things: Create a copy of your reporting view that includes data from all your domains in it and add an advanced filter to that new view. The filter will tell Analytics to display domain names in your reports.

How to set up subdomain tracking in Google Analytics?

1) Log in to Google Analytics and select any view from the account that you wish to implement cross-subdomain tracking. 2) Access the admin panel by clicking the gear icon in the bottom left of the screen. 3) Under the property column, navigate to Tracking Info > Referral Exclusion List.

How to ignore multiple domains in DoubleClick tracking code?

If you have the old ga.js (or doubleclick.js) tracking code, simply add your domains as ignored referrers in your tracking code: If you need to ignore multiple domains using ga.js or doubleclick.js tracking code, add multiple lines like this one. In either case, make sure that they come between the “setAccount” and “trackPageview” lines.

How to display domain names in analytics reports?

The filter will tell Analytics to display domain names in your reports. Follow this example to set up a view filter that displays domain names in your reports when you have cross domain measurement set up.

How to measure a session across multiple domains?

If you want to be able to measure a single session across multiple domains, you need to add your domains to the referral exclusion list. The best way to validate that cross-domain measurement is set up correctly is to use Google Tag Assistant Recordings.

How to set up cross domain measurement in Java?

To set up cross-domain measurement for multiple top-level domains, you need to modify the Analytics code on each domain. You should have a basic knowledge of HTML and JavaScript or work with a developer to set up cross domain measurement. The examples in this article use the Universal Analytics snippet (analytics.js).

Which is the canonical URL in Google search?

A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site. For example, if you have URLs for the same page (for example: example.com?dress=1234 and example.com/dresses/1234 ), Google chooses one as canonical.

How does GA tracking work on a website?

As a result, website owners will not have an accurate picture of how a user moved across subdomains and the root domain. Here’s what happens normally: Every time a user comes to a website, GA tracking notes that visit as a session and begins tracking how that person interacts with a site.

What makes a website a property in Google Analytics?

“In Analytics, your business is an “Account,” and a website is a “Property,” says Andy Crestodina of Orbit Media. “So keep things organized and put every site under the same account. It’s like a family with grandparents and parents.

Can a website be an account in Google Analytics?

For example, not being able to see how many people from one microsite go back to your main site and vice versa. “In Analytics, your business is an “Account,” and a website is a “Property,” says Andy Crestodina of Orbit Media.

What happens when I add a domain to my Google account?

If the domain you’re adding has its own set of users, add it as an additional domain. Users can have email addresses and accounts at their respective domain. And they can collaborate internally using your Google services. Learn more about adding domains and limitations with multiple domains.

Can you have multiple domains in Google workspace?

If you own multiple domains, you can add them to your Google Workspace or Cloud Identity account. Depending on how you add the domain, users can have an email address or user account at one or more domains. Learn more about multiple domains . What is a domain alias?

In Google Analytics, each account can have several properties. Furthermore, each property can have several views. Usually, one account includes all properties owned by the same company. Different websites and applications are then tracked as different properties.