How to use Google Analytics to track clicks from within emails What s the Benefit? Constant Contact can tell you which of your email recipients clicked a link in your email. They will give you the percentage of the emails that acted on the email by clicking as well as the actual number. This is probably the most important metric as it indicates how successful your email is in engaging the recipients. Drill down and you can even see the emails of those that did respond. You might even want to reward them in some way with a follow-up email. What we want to study in this white paper is how to get even more important information on these clicks. We call this Beyond the Click tracking. We would like to know the general location of those that clicked and what date and time they clicked. We might want to differentiate between clicks that came from email, Facebook or Twitter. If we could get this information we could use it to plan future mailings and compare email with social media. To do so, we have to reach beyond Constant Contact s excellent tools to a free service called Google Analytics. From now on, we will call Google analytics GA and Constant Contact CTCT. GA = Google Analytics CTCT = Constant Contact Let s start with looking at what is provided by CTCT. Here is an example of what you might see in their reports. Click on the (9) link and we can see who clicked on the email s link. Note, I am doing pretty well both for this email and overall with an average well above my industry, consulting. Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved 1
This may be all you need if you just do email, but if you add social media to the mix you will have people coming to your site from your email, Facebook, Twitter or LinkedIn, etc. How can you tell them apart? Wouldn t it be great to know where they are located, what date and time they clicked and more? This is where GA tools can take over the tracking of your email. There are three major steps you need to follow to do this: 1. Create a profile with GA and insert the code they give you into the web pages of your site. 2. Add a user defined campaign name to an email sent. 3. A few days after sending the email we can see the results in the GA reports. We will break this down into more than three steps, of course. More Click Info Using GA, Step-By-Step To get it to work you first need to have enabled GA tracking on the pages of your site that you link to. Once you have signed up with GA, they will create a small custom JavaScript code snippet which you will need to add to the pages of your site. Step 1 - Create a GA Account Go to http://www.google.com/analytics/. If you have a Google account, sign in, or create a new account. 1 - Opening Page of Google Analytics 2 Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved
Step 2 Go to the Reports Page to get to your Admin Link We are not going to cover how to add your website as there are great wizards that help you do so, but part of the process is to add the URL of your website. Once you have completed your setup, you can drill down to the reports page. From there you can go into the Admin section to retrieve your JavaScript code needed for your web pages. 2 - Reports Page of Google Analytics Step 3 - Retrieve and Add the Generated Code to Your Web Pages On the admin page click the Tracking Info tab. At the bottom of this page is the code you must insert into each of your website s pages. This assumes you have access to the source code of your site. If not, or if this seems a little too techie for your taste, you can get someone with the skills to do it for you. Give us a call if your need help. Once done, any hit on your web page will collect data from the incoming browser and send that data to Google Analytics (GA). They store it in a database. Later when you go to reports in GA they chart that data into the report screen you see in image 2 above. Unfortunately, email, which like a web page is HTML, it does not process any JavaScript. I cannot place this code snippet in email and have it work. The rest of this article is about how to overcome this limitation. Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved 3
3 - Admin Page and Tracking Info Tab Step 4 Adding a Campaign Name to Your Emails When you are at the Schedule an email screen, you have an opportunity to include GA. Check the Include Google Analytics box and type a name for this particular campaign. My example is my May 2013 email newsletter. 4 - Create a campaign title before you send 4 Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved
Step 5 How It Works The URL I placed in my email might be something like this: http://smartypantssocialmarketing.com/schedule.aspx. This might take me to my website, but GA does not know I came from email. I need to tell GA this is a link in email. To do so, I need to add extra information to the URL. I do so by adding key/name pairs after the end of the link. We do this by adding a question mark (?) followed by three key=value pairs separated by the ampersand (&). The keys must be exact as follows and they are: 1. utm_campaign=newsletter-may-2013 a. CTCT sets this value to the campaign title you created above. 2. utm_source=email Newsletter May-2013 a. CTCT sets this to value of the internal name of your CC email. 3. utm_medium=email a. CTCT sets this to the value email if the link comes from your email or the View as Web Page link at the top of the email. The email links now contains the original URL plus the three key=value pairs. It would look like this in the email: http://smartypantssocialmarketing.com/schedule.aspx?utm_campaign=newsletter-may- 2013& utm_source=email%20newsletter%20may-2013&utm_medium=email The %20 represents a space. Spaces are not allowed in URLs. CTCT only asks for your Google Analytics Campaign Title value (Newsletter-May-2013) and they supply the name of the email (Email Newsletter May-2013) and type of link (email). Step 6 Viewing the Results in GA The results below do not match up with the email above. This is a sample I created just to show how you can drill down into the information we now gain from adding GA to CC. On the left of the report screen you have a number of tabs. When you click the Traffic Sources tab it expands to look like this: 5 - GA's left menus for seeing traffic sources Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved 5
Click the Overview link and we see how our sources of traffic compare in a pie chart: 6 - From where is your traffic coming? Click the Sources-All Traffic and we get a matrix of sources showing some interesting details. Note that I had a link from Facebook and even from some smart phones (my.dudamobile.com/referral). 7 - Ranking and details of incoming traffic Clicking on the menu choice Campaigns opens showing the Campaign link at the top. I called my test campaign Smarty Pants. 8 - Campaign we have created Clicking on the source shows the email I used. Note that active GA users would probably have multiple campaigns, multiple emails, and probably multiple sources. 9 - Sources of incoming links 6 Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved
Last, clicking on the Medium tabs shows the types of links, in our case only email. In the real world we would have email, Facebook, Twitter, Banners, Pay-to-Click such as AdWords, etc. 10 - Mediums that created the incoming links My hope is this helps you understand the value of using Google Analytics. I did not show in this guide, but I can see where the email links were clicked by country, state and often cities and when they were opened, to the second. If they were using web based email such as Gmail, Yahoo or AOL, I can tell you what browser they use, what operating system and even what screen resolution they are using. These give me great stats I can use to shape future emails. Here is a URL to a FAQ on CC that talks about how their link automation works: http://tinyurl.com/q9944wc Smarty Pants Social Marketing Copyright Dave Armstrong 2013 All rights reserved 7