简体   繁体   中英

Google Analytics on domain and subdomain

I have a working website (let's use example.com) with Google Analytics working already.

I am launching a simple section, unrelated to my domain content in a subdomain (sub.example.com). I want to track example.com and sub.example.com's analytics as independent websites.

I have two questions. Is setting them as independent websites better than creating a new view? In each case, how can I accomplish this?

If they are not related at all, then yes- use separate Properties (instead of just making a new view).

To treat them as separate entities, simply create a new Property under the same Account in the Google Analytics Admin section (click the dropdown under "Property" then click "Create new property"). You'll get a new Tracking ID that you'll include just like you did with the first one. This data will be entirely separate from your other site data- including any custom definitions too.

If, for whatever reason, you decide to use the same view, just copy the existing tracking code from the main site to your subdomain site. To reiterate, however, if they are unrelated, then use a new Property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM