Set up (web)
Web tracking: Set up overview
The Google Analytics tracking code collects visitor data for your web property, and returns that data to Analytics where you can see it in reports. When you add a new web property to your Analytics account, Analytics generates the tracking code snippet that you need to add to the pages whose data you want to collect. The tracking code snippet contains a unique ID for the web property that lets you identify that property's data in your reports. You can use just the snippet that Analytics generates for you, or you can customize the tracking code to collect additional data like transactions and product purchases (ecommerce) or visitor behavior across primary and sub-domains (cross-domain tracking).
To get started, read about setting up the tracking code on your web site.
You can also track visitors across multiple domains.