Google Analytics for Beginners: The Basics for Marketers
- Dean Ara
In this blog series for TPM, data scientist and Google Analytics expert, Kushal Sharma, explains everything marketers need to know about Google Analytics. In the first post, Kushal explains Google Analytics for beginners, including: the information it collects, how it collects it, and how the reports are viewed.
Google Analytics for Beginners:
1. A Guide to Information Collected
Google Analytics requires you to embed its tracking code in the header of every webpage on your website. When a user navigates to your webpage, information from their device is collected and read by this code and sent to Google’s servers.
Data collected by Google Analytics:
- The device the user is using
- The location/area the user is accessing your webpage from
- The time the user spends viewing your webpage
- Other actions the user takes (e.g., clicking on buttons and interacting with elements on the page that you’ve programed Google Analytics to track)
Each piece of data sent to Google is called a ‘hit.’ Google Analytics compiles these hits and presents them to you as count visits, pageviews, and other Google Analytics metrics.
2. How Data is Organized
The data Google Analytics gathers for its reports are defined by dimensions and metrics:
- Google Analytics Dimensions is data that shows where a user is coming from, like the city from where the traffic is coming from or the platform it’s being accessed through. Typically, dimensions produce rows of data in your Google Analytics table (e.g., City as a dimension produces individual rows representing each city).
- Google Analytics Metrics is the data that sees the number of times something has been viewed. Metrics typically produce the columns of data (e.g., Pageviews will be one column of data that summarizes that metric for each city in the dimensions)
For example, if you’re looking at how your website is performing in Singapore (the dimension), the 6,307 Pageviews recorded would be your metric.
3. Browser Cookies
The difference between the Google tracking code and a cookie is that the tracking code lives on the website, but the cookie lives with the user.
A good analogy is a hand stamp at an event or a club. When you go to a club, sometimes the host will stamp your hand. The stamp stays on your skin and serves as an identifier. That way, the next time you show up, the host knows who you are. In a web browser, that stamp is called a cookie.
When you visit a website using Chrome, Safari, Edge, or Firefox, the website can save a ‘stamp’ on your browser that remains even after you navigate away from the website.
The stamp can contain information such as a unique identifier, when it was created, when it’s due to expire, authorization tokens for the website (so you can stay logged in), etc. This allows the website to identify repeat visitors and even enable access to restricted areas (such as your user account page) without having to sign in again.
Google uses cookies to attach additional data to a user profile. It can then look at each hit data point and attach it to the right user. This creates a timeline of the user’s activity on a website spanning days or even months.
Browsers can even carry a user’s profile and data across devices. For example, if you use Chrome on your laptop and on your phone, the cookie that was set on your computer’s browser will be shared via your Chrome profile on your mobile phone. This allows Google to be able to tie both those visits to your unique user ID (Client ID in GA) and provide a richer picture of your activity.
On most sites, cookies have an expiration date. This is a sign that a site is respectful of your privacy and saves your cookie data only for the period of time that it deems necessary.
4. The Role of UTM Parameters
UTM parameters are tags that you add to a URL that have additional pieces of information that don’t need to change your destination page. When someone clicks on a URL with UTM parameters, those tags are sent back to your Google Analytics for tracking.
Example:
https://totalproductmarketing.com
will take you to the same page as the URL
https://totalproductmarketing.com?source=trainingslidedeck
The “?” after the URL is called a “query.” Developers can use this to actually change the content visible on a website for personalization purposes. The most common use of the query is to differentiate between traffic that comes from one source versus another. For example, you can send an email containing the URL https://totalproductmarketing.com?channel=email and you create a google ad with the URL https://totalproductmarketing.com?channel=googlead and track the performance of the content by source in Google Analytics.
Popular UTM Tags
- utm_campaign: the name of the overall campaign you’re running across multiple channels
- utm_medium: the channel through which this particular link is distributed (e.g. email, paid ads, referral traffic, etc.)
- utm_source: one level deeper than medium. If it’s an ad, on which network is it going? Google, Bing, Facebook, Instagram, etc.
- utm_content: use this where additional information on the promotional content would be valuable. E.g. if you’re using A/B testing, use this to show a link that goes to version A or version B
- utm_term: if you’re using paid ads, use this to differentiate which search term the ad was targeting
5. Setting Goals
Google Analytics goals measure how well your website fulfills your target conversion objectives. Examples of goals include making a purchase (for an eCommerce site) or submitting a contact information form (for a marketing or lead generation site).
Under the hood, goals are really no different from a pageview or event in Google Analytics. What sets them apart is that the page or event for a goal is chosen specifically to appear only after a user takes the desired action e.g. a “Thank You” page that you see after you fill out a form or an event that gets triggered only after you submit your credit card information, etc.
Goals can be customized to measure something uniquely meaningful for your business, such as:
- Number of pages viewed in a session
- The time someone spent on the website
Smart Goals, not to be confused with business SMART goals, are slightly different as they use machine learning to find the most optimal sessions for your website and use that as a goal to optimize Google Ads with.
6. Pageviews and Landing Page Reports
Pageviews highlight the number of times a particular page was viewed (i.e. a hit was recorded by Google Analytics). The session during which this pageview occurred could have started on any other page on your website. As long as the user came across the page in question at some point during their visit, it would count towards the pageviews for that page. If the same user comes back to a page 10 times, 10 pageviews will be recorded.
Landing page reports, on the other hand, speak to how many sessions started on a given page. If a session didn’t start on that page, it wouldn’t count towards that page’s landing page sessions. Instead, that session would count towards the landing page session of the other page where it started.
Read the next post in Kushal’s Google Analytics blog series: Google Analytics for Marketers: A/B Testing and Google Ads.
Explore more posts in Kushal’s Google Analytics Marketing Metrics blog series: