Just recently I was slightly involved in the migration of a site. The migration was somewhat successful, although a lot of planning and check lists were lagging. Although I have not been involved in a lot of migrations of websites, I know what to look out for. Unfortunately I was only consulted in a late stage of the plan, and with my current responsibilities, I did not have more time to invest in the project. I guess the team had to learn it the hard way…
One new learning for myself is how to use Google Analytics Advanced segments to setup alerts for 404-error messages. The 404 ‘Page not found’ error message is the nightmare for any project lead in a site migration. The 404 means you did a particular bad job in making sure the user experience was not impacted by the migration.
So if you see something like this in your web analytics, it means you either fix the issue real fast, or start updating your resume:
And although it does not look that bad, only 2.6% of page impression throw in a 404 in this report, the details speak louder than words. The report above here is on a full 30 days time frame. If you isolate the days after the site migration, the error rate is on average a whooping 12%!!! WOW, talking about a bad user experience here!
Setting up Advanced Segments to track the 404 Page not Found error message
The Google Advanced segments can come in handy here to track on a daily basis how many page impressions resulted in a 404-error. This can help identifying the problem, alert you when something is going terribly wrong, and maybe most important: collect enough data and reports to hold everybody accountable for their responsibilities. Data doesn’t lie 🙂
In Google Analytics simply open up a new custom advanced segment to track specific pages with the title of the 404-error page you have set up on your site. This will allow you to track each functionality within Google Analytics against this specific segment. And it’s so easy to set up:
- Go to advanced segments
- Create a new segment
- Under Dimensions, open the Content drop down
- Drag Page Title to the box: dimension or metric
- Now type in the title of your 404-error page in the Value box
- Give the segment a name
In all the dashboards of the reports within Google Analytics you can simply choose the advanced segment as a reporting layer. In the image below you can see the standard dashboard with the traffic on the 404-error page reported as part of the total. The red –arrow and highlighted box points out where to select which advanced segment you can choose.
It’s fairly easy to screen which URL’s are throwing a 404 error if you know your way around in Google Analytics. Just select the Content by Title under the Content tab in the left navigation menu (Red box). Then select the 404-error page for a detailed report. The icon in front of every page which is being reported is the URL you would need to fix (here highlighted in the Orange Box).
These are all the URL’s on your site which throw a bad user experience for the people that try to access it. All these people will see the following message. And although their experience has already been ruined, just make sure you learn from your mistakes and fix the issues!
The possibilities are endless. You can slice and dice the date to see which referral sources have caused the 404-error. So if the referral is coming from a non-search engine, you even are able to harvest link juice which would have be gone forever if you didn’t fix the issue.
Or you can look for referral keywords which get a 404-error. I bet you will see high rankings on these keywords. If you don’t take action, you will loose these rankings, and any potential traffic associated with it.
Hack It, Break It, but always Fix It
You approach works fine if you have the Analytics Code on Error pages. If you use a CMS, like WordPress, it’s also on 404 pages. In all other installations it’s a standard 404 page set up by the developers of the webserver. First step to get your solution going is then to change the webserver configuration to serve a modified 404 page with the GA script included – on my to do list now 😉
Very good point!
The site in question was not coded on WordPress, but did have a custom 404-page with Google Analytics installed.
The trick only works if you can actually track the 404 errors and on which URL’s there are being reported in Google Analytics.