Conversion Tracking with Google Analytics
Last year, Raybeam was growing its team, and our website was one tool we used to encourage candidates to apply. Only problem was, we had no idea whether it was doing that.
What we needed was a conversion funnel, a tool that shows us, of all site visitors, how many stayed on the site (i.e. didn’t bounce). And of the non-bouncers, how many visited our “careers” page, and of those that visited our careers page, how many clicked on the link to our application site.
With this information, we can better understand our audience. Are people not even visiting the “careers” page? Then site traffic probably leans towards potential clients and we should do more to bring potential employees to the site. Or maybe visitors go to the careers page but don’t click the “apply now” link. Then we should do more on that page to encourage candidates to apply.
But to get that information, we’re going to have to start with some basic site tracking. We chose Google Analytics (GA). GA is easy to set up and its Web UI has a wide array of features to track events on-site.
We’re going to:
Set up Google Analytics
Troubleshoot a troubling bounce rate
Add conversion tracking to our “apply now” links
Create a basic funnel-style report that shows the number of users at each step.
In a future post, we’ll get into the built-in Google Analytics funnel tools, called “Funnel Visualization” and “Goal Flow”, and talk about when you might want to use each.
Setting up Google Analytics: Easy as One, Two, Three, Four?
Click on the admin button (bottom left)
Under “Tracking Info” ...
… click “Tracking Code”
Copy the code snippet into the header of every page you want to track.
A fun activity is to go poking around other websites to see if and how they’re using Google Analytics. Here I found the snippet on whitehouse.gov. And if it’s good enough for the President, then it’s good enough for us!
What to do when Everything is a Bounce
When we first set up Google Analytics on the Raybeam site, for some reason it showed 100% bounce rate. Very suspicious.
Which actually does explain our problem. On most websites, each page is a separate file, and when someone clicks around the site, the site has to serve the new file. Google Analytics sees that and knows the user didn’t bounce.
But, on some newer websites (maybe yours?), the entire site is one index.html file. Even though the user may think he’s clicking around to different pages, they’re all just different views of the same page. One site visit = one page view. Hence, the bounce.
What to do?
We’re going to add gtag() calls to the page links. That way, when someone clicks on a link, Google Analytics sees something happening and recognizes that the user hasn’t bounced.
Specifically, in the menu we add onclick parameters to the html link:
The bit in pink tells our site to actually do something that Google Analytics can pick up as not-just-a-bounce. Not only that, it tells GA the page the visitor navigated to, so we can hopefully have page-specific metrics.
Conversion Tracking
There are a lot of reasons Raybeam has a website. For one, we need something to show our parents when they ask what we do for a living. But also, we hope potential employees can find us our website, see our fantastic benefits, and click on our “first phase” link. One interesting question is: what percent of visitors to the “careers” page actually click on that link?
We will need to track clicks.
We’re going to use the same strategy we used above to alert Google Analytics when someone clicked on a page link, except now we’re tracking conversions, not page views.
Our event is now a conversion, and we label it as “Software Engineer”.
We’ve also added a second parameter, a transport_type, set to ‘beacon’. This parameter tells the browser to send the event data before navigating to the next page, because once they’re on the next page, they’re dead to us.
Funnel Report
Now that we’re tracking conversions, we can finally set up a funnel report in Google Analytics and see where we’re losing potential candidates.
Setup
First we will have to set up goals in Google Analytics to tell GA about the conversions we’re tracking.
To get to the “Create Goal” interface:
Admin → Goals → Create Goal
In this case, we’re going to use the following settings:
Goal Setup:
Custom
Goal Description:
Name - Software Engineer
Type - Event
Goal Details:
Category equals to general
Action equals to conversion
Label equals to Software Engineer
Report
Now we can make the funnel report.
Customization → Custom Reports → New Custom Report
I setup this report with
Title: Conversion Funnel
Name: Conversion Funnel
Metric Groups: Bounces, Sessions, and Software Engineer Quiz
Dimensions: Date
You’ll now be able to see across the bottom how many visitors reached each step of the funnel.
Possible Next Steps
Now you have the basics set up, you can customize it to your use case. For example:
Add another data source.
Our funnel stops when people click on the “apply” link, but how many actually start the application process. How many submit an application? Of those, how many do we interview? And how many do we eventually hire?
This information isn’t on the company website; we’ll have to add Google Analytics tracking to careerseval.raybeam.com, the site that manages our applications.
Add filters, such as Geography, Age, or Acquisition Channel
In our case, maybe we’re only interested in people visiting the site from the US, so we could add a geography filter. Maybe you want to add only visits from your email campaign, or customers in your target age group.
Exclude Test Clicks
Especially when you’re just starting out, many site visits could be from your team, testing things out. You can remove some of these visits by filtering out any visits from your office’s IP address
Admin → All Filters → Add Filter.