When your SaaS platform has a login on the homepage, it can be very easy to confuse organic ToFu website traffic with users who are only visiting your homepage to log in to their accounts. Think platforms like Salesforce or InsightSquared. I personally go to their login page six or seven times a day and it's a safe bet a majority of their users do as well!
Over time, that traffic can amount to a real misunderstanding of how organic visitors are actually interacting with your site. But if you follow this method, you can ensure that you're accurately tracking user behavior and gain higher visibility into which website visits are users versus actual organic traffic. Let's get started!
To solve this problem, we'll be using Google Analytics in tandem with Google Tag Manager. To start, you need to have at least two views set up in your GA account. The first will be completely unprocessed data — no filters or anything. The second view should be used to filter out your own IP(s). You'll interact with your site far differently than anyone else who visits your site and therefore, you'll need to filter out that traffic.
For this use case, we're going to add a third filter that will exclude all traffic from people coming to the site only to log in. Once again, we're assuming that these people will be interacting with your site differently than most. They're not looking for new information, they already have all of the info they need from your site.
Once you've created a new view, you'll need to create a filter. To do that, head to Admin - View Settings - Filters - Add Filters. Google analytics has a variety of predefined filters that can be used to filter out traffic based on criteria such as your IP address or subdirectories. But what you'll need to do is create a custom filter. You can create one in relation to nearly every field in Google Analytics. For this case, create the filter based on a custom event. This event will be fired by a tag/trigger combination you'll establish in Google Tag Manager. So let's cover that first, and then we'll circle back.
Google Tag Manager
The first step inside GTM is to create a container for your website. Once that's in place, it's time to create the trigger/tag combination. Essentially, the trigger's role will be to wait for a defined action to happen on your website and then immediately fire an associated tag to mark that the action occurred. You can create a trigger to fire based on several criteria, two of which are especially relevant for this solution.
- Page View — when a user goes to log in to their account, they'll visit a specific page. That page will have a specific query string in the url, most often we see this end in /login. In our experience, enabling the trigger to fire on a page view has proved to be the most reliable.
- Click Event — this trigger type will fire on either all clicks or some clicks. For actual visibility, use some clicks and define the click based on the query string associated with your login link. This is the second most reliable trigger, but it fails to account for non-users who might have accidently clicked to log in, but don't actually continue.
Once the trigger is established, it's time to link an associated tag. For that, head to Tags in GTM and create a Universal Analytics tag with the track type set to event. This tag will be tied directly to your GA account and configured with a defined event category, event action and event label. It's very important that the fields included in this tag are specific to the event, because we will use one of these three to link the tag back to the custom event GA. Finally, to make the tag fire, choose the trigger that you just created. Make sure your setup looks something like below:
Filtering out login traffic
Next, you're going to head back into Google Analytics. It's time to actually create the filter to exclude login traffic. Create a new filter, with the Filter Type set to exclude and the Filter Field set to either event category, action, or label. It doesn't matter which of these you chose, but make sure that the naming convention you enter in the Filter Pattern explicitly matches what you've defined it as in Google Tag Manager. This will link the filter to the tag and finally back to the trigger.
Once this is set up, it's good practice to head to your real-time analytics tab in GA to check that the event is firing properly. It can also be beneficial to create another view that will capture the opposite data (i.e. people who aren't logging in) so that you can compare the accuracy of your new GA views against the original, unprocessed data. If the each event appears to be working the way you want it to, head back to Google Tag Manager and submit the changes in the upper right hand corner to officially publish your changes.
And there you have it! Your Google Analytics is now set up to track actual user behavior. Are there any other techniques you've used to solve this problem in the past? Or any Google Analytics issues you just can't seem to solve? Leave us a comment below, we'd love to hear them!
Topics: Insight Analytics