Adding Annotations In Google Analytics

Have you ever looked through your website’s analytics and saw a spike or sudden drop in traffic or actions? Have you had to think back to see if you changed anything during that time period? Or, maybe you couldn’t remember when you started that A/B testing?

This is where annotations can come in to help!

Just getting started with Google Analytics? Start with my intro to Google Analytics article.

Annotations In Google Analytics

Annotations are a way for you to add notes in Google Analytics for when you or your team are reviewing reports in the future. These notes are stored in the “view,” so they will appear in all reports within the view, including Acquisition, Site Content, and Goals.

On any report you view, you will see icons representing any annotations during that time period. When you see those, you could click down the arrow just under the dates to reveal the list of annotations.

When To Add An Annotation

Almost any change you make to your site or marketing efforts can result in changes to your traffic, conversions, and revenue. But, you probably don’t need to add every thing you do every day as notes.

When making changes to your site or your marketing, be sure to add an annotation in Google Analytics! Click To Tweet

Some reasons you may want to an annotation would be when you:

  • Perform a significant update to your Content Management System (WordPress)
  • Make a design change
  • Make a server or hosting provider change
  • Begin a new marketing campaign, such as a new Facebook ad
  • Release a new product
  • Add a new payment method to your checkout
  • Fix an issue on your site

How To Add An Annotation

To begin, sign in to your Google Analytics and go into the “view” you would like to add an annotation to.

From there, navigate to any individual report, such as the “Behavior Overview” report. Change the dates to the date range that includes the date you want to add a note for.

Click on the small down arrow along the date’s of the graph.

Click the “+ Create new annotation” link on the right side.

Select your date and enter your note.

In most cases, you will want anyone on your team to see this annotation so you can keep the “Visibility” set to “Shared.” However, if this annotation should only be seen by you, you can switch this to “Private.”

Lastly, click the “Save” button. Your annotation is now ready!

What’s Next?

Now that you are adding annotations to your reports, it’s an excellent time to review your UTMs and your event tracking to ensure those are up to date as well.

Using Views And Filters In Google Analytics

Have you ever wanted to filter out yourself or your office from your site’s Google Analytics? Or, have you ever wanted to make modifications to the data as it comes into Google Analytics? If so, using filters are a great way to do that!

What Are Views?

If you have already set up Google Analytics, you may have noticed that you were viewing reports in a view called “All Website Data” or similar. This is the default “view” that is set up when you create a new property. Each view is a different set of data that was sent into Google Analytics for the property.

When your site sends data to Google Analytics for a property, it will look through all your views to see which views to add the data to. Right now, you may just have the “All Website Data” view which, by default, will receive all data from your site. This is a great place to start.

However, there may be things you want to remove from the data. For example, if you have a dedicated desktop computer, you may want to remove all of your interactions with your own site from the data. You may also want to remove spam and bots from the data too.

Since views can also have different permissions, I have seen some people set up views with specific limited data and give some users only access to that view. One example may be a salesperson who only needs to focus on data relating to certain pages and needs to set up goals that are different than the main view’s goals.

Setting Up Your First View

Before you begin with views and filters, the first thing to know is that you will never want to modify the “All Website Data” view. Data cannot be added to a view retroactively. So, if you accidentally set up a view to where it doesn’t store any data for your site, you will not be able to get the data back. So, by keeping the “All Website Data” view as-is, you know you will also have all the data to go back to.

So, most people set up a second view. Some people call it “Real View”. Some call it “Master View”. For most of my sites, I just call it “Without me and spam”.

Keep in mind that the only data in a view is what was collected after it was created. So, none of your data already in Google Analytics will appear in a view which is why you want to set up your first view as soon as possible.

To set up your new view, go to the Admin area and select your account and property. On the far right, will be the view settings for your default view. You can click the “Create View” button to create your new view.

Screenshot of the Admin view in Google Analytics showing columns for Account, Property, and View.

Name your new view, change the timezone if needed, and then click “Create View”. If you are not already, go back to the Admin area and click the dropdown on the far right under “View” to select your new view. Make sure to not make changes to the “All Web Site Data” view.

The first thing that you will want to do is click “View Settings” and scroll down to the “Bot Filtering” option. Go ahead and turn that option on.

Screenshot showing new view settings including "Bot Filtering".

Note: If you want to track what people search for on your site, be sure to turn on “Site search Tracking” while you are in the View Settings. In WordPress, the default query parameter to enter is s. If you are not using WordPress, you will want to search or ask the support team of the software you are using to determine the query parameter.

Once you have turned on bot filtering, go ahead and click Save. Great! You have your first custom view set up. Now, let’s add your first filter.

Adding A Filter

If you are not already, go back to the Admin area and click the dropdown on the far right under “View” to select your new view. Make sure to not make changes to the “All Web Site Data” view. This time, click on “Filters”.

Screenshot of view settings in the admin of Google Analytics with "Filters" highlighted to reveal an empty table for filters.

Filters are how we can tell Google Analytics what to include, exclude, or modify in this view. We can use filters to exclude IP addresses (such as your desktop computer), locations, certain referrals, certain parts of your site, and much more. Additionally, you can use filters to exclude data that you know is spam.

For example, there was an issue in 2018 where a lot of bots were sending in fake information into certain fields within Google Analytics. The easiest way to get rid of it was by using a filter.

Lastly, you can use filters to modify data as it comes into Google Analytics. Something to remember in Google Analytics is that everything is case sensitive. So, example.com/thankyou is different than example.com/THANKYOU. Also, if you are using campaigns, spring-sale-2019 is different than SPRING-SALE-2019.

As such, Google Analytics will report these as two different things. So, we could use a filter to lowercase or uppercase everything before it gets entered to ensure Google Analytics counts these things as one thing.

To get started with our first filter, click “Add Filter”.

Screenshot of creating a new view with the filter name set to "Removing my desktop" and filter type set to "Predefined".

After you create some filters, you can re-use them in other views and other properties to make things easy. Since we are creating our first one, we will click “Create New Filter”. Next, enter in your filter’s name. Be descriptive of what the filter is doing as you may have many filters in the future.

Google Analytics has many of the common filters as “Predefined”. There are many more things you can do with filters by using “Custom” but, for now, we will use Predefined. Select “Exclude” from the first dropdown and “traffic from the IP addresses” for the second dropdown. Finally, select “that are equal to” in the third dropdown.

Now, open up a search engine, such as Google, and search “What’s My IP?”. Most search engines will list your IP for you. Then, copy that IP address into the “IP address” field for your filter.

Depending on which type of filter you are setting up, Google Analytics may tell you how many data points would be filtered out by the filter in the “Filter Verification” section to help you verify that you set it up right.

Once you are ready, click “Save”.

The last thing to keep in mind before you add more filters is that these are applied one-at-a-time in the order you add them. For most sites, this will not be a problem. However, there may be times you want to have filters build upon each other. After you add multiple filters, you will see a new “Assign Filter Order” button appear.

Screenshot of the filter table showing several filters added to the view including "Spam Filter" and "Force Lowercase Campaign Source"

If you click this, you can re-order the filters to achieve the results you need.

Next Steps

Great job! You now have your custom view and a filter applied to it. Now, if you haven’t already, you will want to make sure you have event tracking set up as well as your conversion tracking.

Not Using UTMs? You Should Start Right Now!

When you are trying to get visitors to your site from a variety of sources, things can get a little complicated when deciding which marketing channel to focus your time and money. Maybe you are using paid ads, social media marketing, email marketing, and more to drive traffic to your site.

If only 5% of your site visitors are converting to paid users or signing up for your email list, you would probably want to know which source of your site’s traffic is getting the most visitors to take action on your site.

With UTMs, you can:

  • See which links in your emails convert the best
  • See how many people click the link in your email signature
  • See which social media posts create the most customers
  • Group links across marketing channels into campaigns to compare different campaigns
  • And much more!

What Are UTMs?

UTMs (Urchin Tracking Modules) are one of the best tools to see which link is sending the most visitors to your site that are converting. In this case, converting means completing the thing you want them to do the most. That could be purchasing your product, signing up for your email list, or any other goal that you have set.

Using your website analytics, you can track the UTM parameters or components added to the end of a URL. Just getting started with analytics? Check out my “Getting Started with Google Analytics” article.

UTMs are one of the best tools to see which link is sending the most converting users to your site. Click To Tweet

You have probably come across UTMs before as you have browsed the web. The following URL is an example of a URL with UTMs:

http://example.com/?utm_source=google&utm_medium=search&utm_campaign=campaign_1

In the next image, you can see the Google Analytics for one of my sites. That is the acquisition overview.

Screenshot of "Acquisition" section in Google Analytics showing a few different channels such as Referral and Email.

We can then go deeper into these pages to see how our UTMs compare. For example, in the image below, I examined data from email marketing.

Screenshot from Google Analytics showing a list of campaigns and the sources with mediums.

Parts of a UTM

Diagram showing the parts of a UTM: campaign, medium, source, content, and term.

Each URL will have several UTM parameters added to the end which will be used in a few different ways. Let’s take a look at each part individually.

Campaign

The “campaign” part of a UTM is the name of your campaign or reason for sharing this URL. For example, you might have the main campaign for sharing your homepage. So, you could use “main” or “homepage” as your campaign name. You may also be sharing individual blog posts and use a campaign name such as “intro-to-google-analytics”.

This parameter is for you to identify the URLs when viewing the data in your analytics. Inside Google Analytics, you can compare different campaigns. So, this part of the UTM will be how the website analytics groups different URLs together.

Medium

The “medium” part of a UTM is the type of platform that you are sharing your URL on. For example, if you are sharing a blog post on Facebook, you would use “social” for your medium. If you were using a link in your email marketing, you might use “email”.

Source

The “source” part of a UTM is the platform that you are sharing your URL on. If you are sharing on social media, then your source might be “Facebook” or “Twitter”. If you share this link inside your email marketing, the source may be the specific email such as “welcome-email” or “google-analytics-course-email-1”.

Content

The “content” part of a UTM is an optional parameter that you can use to differentiate between URLs that are using the same campaign, medium, and source.

Another example would be using this to show the different links in the same email. You may send out an email announcing a new feature or sale that has multiple links. You can use this parameter to show the difference between the links using “top-of-email-link” and “bottom-of-email-link”.

Term

The “term” part of a UTM is the final parameter and is also optional. You can use this part when the URL is a part of paid ads to track the keywords. You would enter the keyword that you were targeting to keep track of which subsets of ads were converting the most visitors to your goal.

Example of Usage

Now that you have a general idea of what UTMs are let’s take a look at an actual example of how you can implement these in your marketing. Recently, I hosted a webinar. I sent out several emails and posted many times on social media. I needed to be able to know exactly which link got the most registrations so I can optimize my marketing approach.

In my announcement email, I included three links to the registration page: one at the beginning after mentioning the introduction, one in the middle after some copy about the problem, and then one at the end of the main pitch.

The UTM parameters I used were:
URL: https://frankcorso.me/webinar-register
Campaign: google-analytics-webinar-040317
Medium: email
Source: launch-email
Content: first-link

So, I had three URLs that looked like this:

https://frankcorso.me/webinar-register?utm_campaign=google-analytics-webinar-040317&utm_medium=email&utm_source=launch-email&utm_content=third-link

This URL was for the third link in my email which was:

Screenshot of email that has a link saying "Click here to register".

All three links had the same URL, campaign, medium, and source. I set the content as “first-link”, “second-link”, and “third-link”. After the email, I looked at my analytics and saw that, while more users clicked the third link, more users who clicked the second link signed up for the webinar.

Using this insight (and more gained from the next few emails), I was able to optimize the emails to convert the most users from my email lists to registering for the webinar.

I also used this same technique with social media marketing. I tested several different tweet formats including with images, without images, links at the beginning of the tweet, links in the middle, and links at the end.

I created URLs like this:

https://frankcorso.me/webinar-register?utm_campaign=google-analytics-webinar-040317&utm_medium=social&utm_source=twitter&utm_content=tweet-2-no-image

Again, the campaign, medium, and source were the same, but the content was different for each tweet. I can then see these values in Google Analytics to see which tweet format converted the most webinar registrations. In my case, tweets with the link in the middle of the tweet with images saw almost 200% more conversions compared to the others.

Reviewing Your Data

Once you started using UTMs, you will want to go to Google Analytics to see how your URLs are performing. To do so, begin by logging into Google Analytics. Next, click on the “Acquisition” link in the side menu and choose the “Overview” option.

Screenshot of Google Analytics showing the "Acquisition" label in the left navigation.

The overview page will list out the main mediums that generate traffic to your website.

Screenshot of "Acquisition" section in Google Analytics showing a few different channels such as Referral and Email.

From the overview page, you can click each of the mediums to look deeper into that medium. Alternatively, you can go back to the “Acquisition” menu and look into the “Traffic” or “Campaigns” submenus to start with other UTMs.

Screenshot from Google Analytics showing a list of campaigns with number of sessions from visitors.

For example, when I want to review the data for one of my campaigns, qsm_plugin, I will go to the “All Campaigns” option and then click on qsm_plugin which brings up this page:

Screenshot from Google Analytics showing a list of sources and mediums with the content for each.

Using the drop-down labeled as “Secondary dimension”, I added the “Ad Content” which is the UTM parameter of content. Using this view, I can compare which links with the same campaign, medium, and source but different contents. For example, in the screenshot above, we can see my link for Quiz And Survey Master’s landing page product provides a bit more traffic compared to some of the other products listed on the addons page. If I scrolled farther to the right, it would show the revenue generated for each of those links.

You can use this same view to review the data from any of your tests.

How to Create URLs with UTMs

Creating these URLs could be extremely difficult and time-consuming to have to type the URL out. Make sure all the parameters are correct every time can be tedious. Luckily, there are free tools to do this for you.

These tools will ask you for the UTM details and then create the URL for you. Google Analytics has its Campaign URL Builder, and Facebook has its URL Builder. I also have used this one by Effin Amazing. You can find many others by searching for UTM builder.

Once you create your URL, you will want to keep the URL somewhere to assist you in using similar URLs in the future. For example, if you are sharing a blog post multiple times on Facebook, you will want to use different content every time. So, you will need to know all the content that you have used before.

Many marketers use spreadsheets to list out each of the URLs and UTMs they have used. This allows them to look up the UTM parameters to see what they have used before.

What’s Next?

Now that you are familiar with UTMs, you will want to start using them every time that you are sharing URLs from your site. To be effective, you need to be consistent with UTMs to accurately track the data in your analytics

Need some more ideas of what to test? Try some of these:

  • Test different formats for your email signature to see which gets the most clicks
  • Test different structures for your tweets to see which gets the most clicks and leads to the most conversions
  • Try using links in various places in your email marketing to see which converts better
  • Test which business card layout drives the most traffic (use a URL shortener such as Bitly to make it easy)
  • Test conversions from presentations that you give in multiple places

Getting Started with Google Analytics

Imagine that your site is getting thousands of visitors per day. Now imagine that about 100 of them are spending money on the site. Obviously, you probably want to get more of the users that are spending money on the site but how do you know where these users are coming from? Or, how do you know what actions they take while on your site before spending money?

What is website analytics?

This is where website analytics comes in. Website analytics collects data about who our site visitors are, where they are coming from, and what they are doing on our sites. We can see where information about our site visitors such as where they are located, the languages they speak, and the devices they used to view your website.

We can also see information about how site visitors got to our site and which pages they spent the most time on. Additionally, we can see what actions they took on the website such as watching a video, signing up for a newsletter, or adding a product to a shopping cart.

Without website analytics, how do you know where your site visitors are coming from and what they are doing? Click To Tweet

By having all this data within one place, we can analyze the different paths visitors take to complete actions on our sites. We can then look into which marketing channels we are using that are the most profitable. This helps us to ensure we are optimizing our marketing to save us time and money.

There are many services out there that offer analytics for your website. Some of the most popular ones include Clicky, MixPanel, Heap Analytics, Fathom Analytics, and Kissmetrics. The most popular service is Google Analytics.

Google Analytics is not only free for most people, but it is also powerful and user-friendly. Even better, you can link it to your Search Console and Google Ads if you use them to add even more information into your reports.

The basics

Before we can get too far with using Google Analytics, there are some terminology and concepts that we want to explore first.

Our first round of definitions correlates to the different levels within your Google Analytics account.

Account

Inside your Google Analytics account, you can have different “accounts” for the different companies or brands that you’re using analytics with. For most people who are only using Google Analytics for their one site, they will only have one account. If you are using Google Analytics with your clients, you may have different accounts for each of your clients.

These accounts are all within your Google Analytics account, so you only have the one login to get into and work with these accounts.

Property

Inside each of the accounts, you can have different properties. These properties are individual sites or apps. For example, if you are using Google Analytics for your own site only, you may have one account with one property in it. If you have multiple websites for your company, you may have several properties within your account.

If you have clients who have multiple sites, you may have different accounts for each client and then different properties within those accounts for each site for that client.

View

Inside each property will be “views”. These views are where the data is actually stored and where you will be reviewing your data. Each “view” is a set of data within a property. For many sites, you only need one main view. However, there may be times where you have a variety of different views to analyze different subsets of data. We will look more into views in a future email.

Our next round of terms focuses on the data that is in Google Analytics.

User

This is a single individual visitor to your website. When a visitor comes to your site for the first time, Google Analytics creates a unique ID for that user and stores a cookie in their browser. If the visitor comes back to your site, Google Analytics will look for the cookie to determine if this is a new or returning user.

Session

This is a single visit by a site visitor. If someone comes to your site and views several pages, that is one session. If the person comes back next week to view some more pages, that would be considered a different session. By default, Google Analytics ends a session after 30 minutes of inactivity. So, if a person browses your site, leaves, and then comes back a few hours later, that would be two different sessions by the same user on that day.

Browsing Your Google Analytics

Now that we have a basic understanding of Google Analytics, let’s take a look through some of the content in the service. First, we can look at the Audience page to see some overview data about our traffic and its visitors.

Google Analytics Audience Overview

On this page, we can see a graph of the number of sessions that the site has had. We can also see the number of users, sessions, page views, pages per session, average session duration, and more.

We can then dive into the Audience section to compare the visitors based on a variety of data such as what language they speak, where they are geographically, what type of device they are using to view your site, and more.

Google Analytics Audience Location

Now, let’s take a look at the Acquisition section. In this section, we can discover where the users are coming from. By default, Google Analytics will break down the channels by search, direct access, social, and referrers as you can see in the image below.

Google Analytics Acquisition Overview

You can then dive into each channel further to learn more about where the users come from in that channel like in this image:

Google Analytics Acquisition Social

Setting up Google Analytics

Now that you know a bit about Google Analytics and what it can do, it is time to get it set up on your website. The first step is to go to Google Analytics and set up your account. You can sign in with your Google account and then you will want to add a property for your website during their guided setup.

If you are using WordPress, there is a really simple plugin called Google Analytics Dashboard for WP that allows you to simply log in with your Google account and then the plugin will automatically set up Google Analytics for your site. It even displays some basic traffic data in your WordPress dashboard so you can easily keep track when you log into your site. This is the plugin I actually use for this site.

If you are not using WordPress, most CMS’s and platforms have a simple process for setting up Google Analytics so be sure to check out your platform’s documentation or reach out to their support. Lastly, Google Analytics will give you some code when you create your account. So, if you know how, you could simply copy and paste their code into your site and not have to worry about any integration tools at all.

What’s Next

Once you have your Google Analytics set up, there are a few more things you can do to better analyze your data. You can track your conversions and create dashboards to quickly see your most important data.

You can also use UTMs to create custom campaigns and get more specific data.

From there, you can track specific user events such as when a user clicks a submit button or downloads a document. If you are interested in learning more, refer to this article on event tracking with onclick.

Interested in development? I now have a dev blog for all my python, git, etc… articles!