It comes up often with our clients — how do I track the performance of URLs that I have redirecting to a different page? Whether you are running a marketing campaign, measuring the performance of a landing page or tracking conversion rates, tracking your redirects could yield a wealth of information to push the needle forward on your business goals.
The trouble is, Google Analytics does not track what redirects traffic comes through; it only gives the raw traffic numbers to a page without tracking if any URL redirected people to it. So, if newmediacampaigns.com/n and newmediacampaigns.com/nl both redirect to https://www.newmediacampaigns.com/about/team/niki-litts, I can see how much traffic ended up at the final URL, but not which specific redirect(s) sent people there. So, how do you work around this to see what redirects are the most effective?
In this post, I'll show you why this can be helpful in the first place and how to use query strings to track redirects in your Google Analytics dashboard.
The Scenario & Need for a Landing Page Redirect
You may or may not know that in addition to all of the verticals we work in, one of our most popular specialties is law firm website design. We market specifically to law firms in a number of ways. Like any business engaged in using different techniques to push people to a specific page on their site, it’s incredibly valuable to know how people got there. It lets us better gauge the effectiveness of our marketing and plan ahead for future efforts.
One example would be if we decided to host a booth at a national law firm marketing conference. We want to track our efforts at the conference and see how many folks from the conference check us out.
We've worked to create a single landing page that explains our offerings to law firms and how we can help them out: https://www.newmediacampaigns.com/services/law-firm-website-design. We want it to be really easy for people to get to the page with a simple URL, so on our printed materials and in conversation, we're going to direct people at the conference to visit www.newmediacampaigns.com/LMA
Since we'll use this landing page for other legal conferences and marketing efforts, it’s important for us to be able to properly attribute traffic to the correct source. Did that visitor come from our LMA presentation? Did they see our ad in the magazine? Did our sweet conference swag convince someone to check us out? In Google Analytics, even if each of these different efforts have their own redirect (e.g., /LMA, /lawmag, /swag), they will all show up as “Direct” traffic to the main page. Google Analytics won’t tell us what redirect they came from.
That's where the query string comes into play.
Setting Up a Query String for Analytics Tracking
To be able to use Analytics to accurately figure out which redirect the traffic is coming from, we’re going to use something called a “query string.” Query strings are powerful little tools that can be used in a lot of different ways. But for the purpose of this exercise, a query string is information added to the end of a URL after a “?” in order to add a differentiator to a webpage URL in order to track traffic from a specific source. The format for a query string in a URL looks like this.
The query string is the information after the ‘?’. As far as the main URL is concerned, everything after the question mark does not exist, sending your site visitors to your intended landing page. The benefit though is that Google Analytics tracks query strings separately, allowing you to be able to look up traffic by different query strings. So, for your visitors, it’s business as usual, while you get to reap all of the data for who is using your redirect.
To use the query string, you’ll just need to setup a short redirect (e.g., /LMA) to go to your page with the query string: https://www.newmediacampaigns.com/services/law-firm-website-design?LMA2016. Any Content Management System should make it very easy to setup and manage redirects and let you create as many as you like. Using WordPress as an example, you can find the “Redirects” option in the Settings menu. We use a plugin called Simple 301 for our Wordpress sites (check out our other favorite, helpful WordPress Plugins).
Tracking the Results
After you have your redirect in place, you are ready to start tracking. After a day or so, I dove into our NMC Google Analytics to see how my query string was performing.
To find this information, I clicked on the behavior tab and selected 'site content', where I was able to search for my query string. You can see that I have already had 11 pageviews that I can track to a specific marketing source. So, the simple addition of a query string when creating my redirect unlocked powerful attribution abilities for me to track my marketing!
We hope this little tid bit helps you up your marketing game a few notches! Happy tracking from all of us at NMC!