Yesterday I wrote about tracking error pages with Google Analytics _trackEvent. I suggested _trackEvent over _trackPageview for it has the ability to add different dimensions to the event and you wouldn’t want 404 pages to increase your pageview count. Tim (Leighton-Boyce) pointed out that a 404 is part of the visitor session, you should be able to track if people bounce on 404 or click through on suggested links or perhaps even use a search box. A very fair point and I stand corrected. I would definitely add the _trackPageview line to the GA tracking code.
Having a short discussion on the topic, Tim stated: “Why not use goal tracking for the 404’s?” – Yeah, why not? Goals not only offer valuable metrics such as the conversion rate, but also valuable insights such as the reverse goal path and intelligent alerts . Tim was unsure about tracking the events to use the reverse goal path report, but I can verify this is possible. This way you are able to point out the path which led to the 404. Some amazing stuff!
So get your ‘track’ on and start tracking your 404’s with pageview and event-tracking. Make sure you link those events to a goal type. I’ve personally set up an complete error profile to experiment more with Tim’s suggestions combined with the event-tracking and I’ll see if it will acquire some valuable new insights. The new tracking cookie for tracking the error pages would look like this:
Good luck and big thanks to Tim for the new insights!
If you have any new ideas, please so share them with me in the comments!
Update: We just keep customizing the code! André Scholten suggested the use of the noninteraction parameter in _trackEvent. This way the event is excluded from bounce-rate calculations and does not affect your bounce-rate. It’s set by adding the parameter ‘true’ at the end of the trackevent, as in the example above. Thanks André!