Google Analytics ( GA ) is a great free resource to stay on top of your website’s performance, but did you know that GA is also useful for monitoring your outbound emails? In this post we show you how to use GA to gain statistical insight into your outgoing emails. If you are a SendGrid user, you will also learn how to use our REST API along with our free GA filter to simplify the process.
Sign Up and Install Google Analytics
First, you need to get setup with GA. Head on over and get signed up and integrate the GA code into your website as directed. In order to obtain the results described in this post, you will need to verify that your GA account was setup properly.
Setting Up the Links in Your Emails to Work with Google Analytics
GA has made it very easy to create custom URL’s that integrate into GA via their URL Builder. Simply fill out the form and click the Generate URL button.
Once you have generated the link with the URL Builder, you can use them inside of your outgoing email and GA will auto-magically track clicks to those URLs in your GA account.
To track conversions in GA, you will need to define and setup your conversion goals.
There are three basic steps:
- Create a descriptive name, such as “Sign up for free trial”.
- Define each URL that leads up to the page where the conversion happens, this is usually the “Thank You” page after a successful transaction.
- Assign a dollar value to the conversion.
Once you have completed those steps, you can use the “Goals” link on the left navigation area within GA to view conversion data such as the number of overall conversions, the value of those conversions and conversion rate. To dig deeper, check out this in-depth treatment from SixRevisions.com.
Using the SendGrid REST API and Google Analytics Filter to Simplify the Process
To try out this method, you will need to sign up for a free account at SendGrid.com. Shortly after you sign up you will receive a verification email that will inform you when your account is active.
I will be using PHP for this example; however, you may also find Perl, Python and Ruby examples at our online documentation.
I suggest you read through the index.php code, updating the settings and credentials as you go through. Then, you can run the code on your local environment or on your web server by simply entering the root URL that contains the index.php file. Be advised that this code will not work until your SendGrid account has been activated.
Examining the Data in Google Analytics
Once the recipients of your emails begin to click on your URLs, those clicks will be recorded in your Google Analytics statistics. Here are the steps to locate that data:
- Login to your Google Analytics account.
- Click on “View report” next to the appropriate account.
- Click “Traffic Sources” on the left navigation area.
- In the same area, click “Campaigns”.
Note that Google Analytics does not display data in real time, so it will take a few hours before you start to see the data.
Within this view you can obtain data such as visits, pages/visit, average time spent on your site, percentage of new visits, etc.
Take a look at this article by MakeUseOf.com, which explains how to gain the most advantage from this method of email tracking.
Dig Deeper with SendGrid’s Analytics
If you are a SendGrid user, you have access to additional data that can help you become even more effective with your email campaigns. After logging into your SendGrid account, click on the “Statistics” tab to view your outgoing email statistics. The data on this page shows you the number of requests, delivered emails, clicks, opens, bounces, blocks and spam reports.
You can also obtain a downloadable list of all the bounced, blocked, unsubscribed, spam reported and invalid emails by clicking the “Email List” tab and the appropriate sub-tab.
We want to hear your experiences, we love great feedback and collaboration. How are you currently tracking data on your outgoing email? Have you used SendGrid’s Google Analytics filter? What was your experience? Ideally, what type of data would you like to be able to track?