Measuring a website.
To measure a website, you first have to create a Google Analytics account. Then you need to add a small piece of Javascript measurement code to each page on your site. Every time a user visits a web page, the tracking code will collect anonymous information about how that user interacted with the page.
The measurement code will also collect information from the browser like the language setting, the type of browser (such as Chrome or Safari), and the device and operating system on which the browser is running. It can even collect the “traffic source,” which is what brought users to the site in the first place. This might be a search engine, an advertisement they clicked on, or an email marketing campaign.
Keep in mind that every time a page loads, the measurement code will collect and send updated information about the user’s activity. Google Analytics groups this activity into a period of time called a “session.” A session begins when a user opens your app in the foreground or opens a web page that includes the Google Analytics measurement code. A session ends after 30 minutes of inactivity. If the user returns to an app or page after a session ends, a new session will begin.
Processing and reporting.
When the measurement code collects data, it packages that information up and sends it to Google Analytics to be processed into reports. When Analytics processes data, it aggregates and organizes the data based on particular criteria like whether a user’s device is mobile or desktop, or which browser they’re using.
But there are also configuration settings that allow you to customize how that data is processed. For example, you might want to apply a filter to make sure your data doesn’t include any internal company traffic or developer traffic.
Once Analytics processes the data, it’s stored in a database where it can’t be changed.
So remember, when you set up your configuration, don’t exclude any data you think you might want to analyze later. Once the data has been processed and stored in the database, it will appear in Google Analytics as reports.