Tag Archives: 404 error tracking

Google Analytics 404 Tracking And Downloaded Files

I was reading Bruce Clay’s September Newsletter and came across a couple of inaccuracies in Jim Sterne’s web analytics article, specifically this part:

Google won’t report on downloads of files like PDF’s, jpg’s of Flash. You want to know about server error messages? You have to look to the pay-to-play vendors.

Well Google Analytics may not give you those reports out of the box, but it’s not too difficult to put these two solutions together:

1) Tracking files downloaded from your site:

Caveat – this method only reports on people clicking links on your website which are tagged with this code. If someone remotely links to a file on your site, none of the javascript web analytics packages will report on that traffic.

2) Tracking 404 error pages:

This could also be used to create error pages and tracking for 5XX errors.

And on a side note, for those of you who use WordPress, here’s a handy way to create a custom 404 page:

If you have your Google Analytics code in a footer include file, you could create a second include and call it from the 404.php.