“Disneyland will never be completed. It will continue to grow as long as there is imagination left in the world.” Walt Disney’s quote resonates well with technology as it is constantly evolving. Information provided in websites are a perfect example of this continuum where content, design and technology are constantly evolving, creating an interesting challenge and opportunity to ensure user satisfaction.
Websites are constantly updated with new content. Existing content is often modified or removed faster than it can be re-indexed by search engines and faster than referring inbound links can be fixed. This fast moving, non-linear momentum results in users visiting pages that don’t exist anymore (404 page), hurting the user experience. How can you stay proactive and minimize 404 pages? Below, using Google Analytics, is our implementation to generate a real-time automated “404 pages & referral pages” report.
STEP 1: Insert Google Analytics code
Here “var ref” has the location of the referring page and “var errorpage” has the location of the page not found. Using custom variables to capture 404 page and referring page location based on user click provides accurate information (posting on Google Analytics forum). Test your changes. Below is a screen shot of the Google Analytics Debugger extension for Chrome. Check if “_setCustomVar” is getting initialized with appropriate information.
STEP 2: Create Google Analytics Custom Report
Create a custom report with Dimensions ‘Custom Variable (Value 02)’ and ‘Custom Variable (Value 01)’. New to creating custom report? Article from Google Analytics about creating custom report.
STEP 3: Pages not found & referral pages report
The report has location of pages not found, location of referring pages and #visits. The report can be filtered and sorted to meet your needs. You can also create notification to receive regular updates in different formats. Amazing, isn’t it? In three steps you can generate automated real-time report so you may start taking steps towards minimizing 404 pages leading to higher user satisfaction.
Last week we saw a spike in search traffic for a specific query term. Further investigation lead to a missing document, users were looking for. Ideas from Annie Cushing article to get full referrer and James Green article about tracking 404 pages lead to prototypes and after few iterations let to the current implementation.