How to Track a Redirect in Google Analytics


Redirects can be extremely useful for webmasters and marketers alike. Redirects allow for marketing / advertising departments to advertise small, easy to remember URLs that customers can remember, and redirect them to the often long and complicated URLs where the advertised products actually reside. Likewise, webmasters can use redirects to redirect old URLs to newer ones. This way, webmasters can redirect users who have bookmarked old, non-existent URLs to their newer replacement.

One important thing to remember is the importance of tracking each redirect. Analytics tools such as Google Analytics won't track a visit to a page unless that page runs the analytics tracking code. If your redirect page is a blank page with no code besides the redirect code, a webmaster will be left with no way to track the redirect. Fortunately, there are ways around this.

How to track a 301 redirect

With a 301 redirect, you are essentially telling the search engines that this page has moved permanently. Because of this, your best bet is to add campaign tracking to the URL you redirect to. This way, you can track the number of times this redirect occurs. If you have multiple pages redirecting with this tracking technique, be sure and give each one a different campaign name, so that you can track each redirect separately.

How to track a JavaScript redirect

If you are using a JavaScript redirect, then you can either track the redirect using the campaign tracking technique above, or you can embed the Google Analytics tracking code on the redirect page in the body section before the redirect code itself. This will help ensure that the tracking script is parsed before the redirect takes place. You can track each redirect by viewing your Top Content or Top Landing Pages (under Traffic Sources).

The importance of tracking a redirect

The ability to track each redirect is important, especially if these redirects are for pages published in off-line media. Tracking redirects is one of the many ways in which you can measure traffic from off-line sources (TV, radio, print, etc).


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.