errr-ROAR pages


errr-ROAR pages

homer-simpson-dohSo I want a tidy way to track error pages in google. Seems like that would happen by default right?

So how about a nice way to see the host, full referring path, and the attempted destination? Then you can make a report and send it over for someone in content editing to deal with it.

Here is what I did.

1. Create a Google Tag Manager account. See here for questions.
2. Create your Google Analytics account for your error pages only.
3. Create a container in GTM. Then use the ‘Custom HTML Tag’ option and insert the following…

<script type=”text/javascript”>

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXX-X']);
_gaq.push(['_trackPageview', document.location.href + 'LinkLocation=' + document.referrer]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);


4. Obviously you need to replace the XXXXXX-X with your own GA code.

5. Don’t forget to fire this on all your pages and add the container to any other error pages.

So what do you get in the end?

6. Head over to your Content Overview page. Content – Site Content – Pages and look at those URLS. Very interesting huh. How add the secondary dimension of host to see where that’s coming from if you are using this error page on multiple different domains.

Your Content Page URLs will look like this…

It will be your job to disect the URL and take care of fixing the errors. Here is the breakdown.

all is well with our analytics

all is well with our analytics

- Ignore the first part…

- Here is destination url which was bad: &ErrorPage=great-software/

- Here is the location where you’ll find that bad link: LinkLocation=

You may want to go ahead and create a handy custom report so that you can always just click on it.


It makes me very happy to see a peaceful error report. :) After you take care of those bad links, it’ll be great. Imagine having this setup once you start a site migration. You might tear your hair out, but atleast you KNOW it’s happening!



  • Priscilla Decker
    Posted at 14:43h, 07 June Reply

    Finally, there doesn’t seem to be an easy way to create language/locale specific error pages but you can create your custom skin templates in your store’s main language.

  • Mark Q. Miller
    Posted at 14:23h, 20 June Reply

    attribute. You can even have multiple custom error pages for different HTTP error statuses.

Post A Comment

Protected by WP Anti Spam