Subscribe to BlogGet all of our latest industry tips by email
Recent posts
- Digital Account Executive – Lifestyle (Food, Drink and Travel) – SEO focus
- The Return of the Penguin and How it May Affect the Travel Industry
- Online Marketing – Acquisition Assistant Manager
- Digital Communications Account Manager
- Digital Account Executive – Retail / Travel (SEO focused)
- Senior Digital Account Executive – Lifestyle (PPC focus)
- 4Ps Marketing Shortlisted for Rev Awards Search Category
- 4Ps Marketing Annual Fashion Dinner
- What Are The Impacts Of The End Of The Financial Year On Digital Marketing?
- A Good Social Media Presence Can Help You Land The Perfect Job
Related Posts
BY CATEGORY
BY AUTHOR
- Aatif Basheer (7)
- Charlotte Kay (1)
- Chris Hyland (37)
- Daniel Hatfeild (4)
- Ellie Steele (48)
- Emma Pilcher (2)
- Femi Ajayi (1)
- Hannah Miller (265)
- Ibeth Santos (6)
- Jack Coy (5)
- James Green (12)
- Jennifer Stapleton (1)
- Karl Jenkins (2)
- Kia McSween (5)
- Kit Nicols (1)
- Laura Pagani (6)
- Lauren Luxenberg (1)
- Lovedeep Jassad (2)
- Luke Knight (80)
- Matt Stannard (39)
- Matt Delaforce (1)
- Matthew Phelan (84)
- Michelle Athersmith (31)
- Nick Shread (6)
- Paul Smith (2)
- Peter O'Neill (1)
- Peter Abraham (1)
- Phoebe Green (6)
- Rachel Kneen (188)
- Rebecca Ponting (7)
- Robert Laver (4)
- Serena Wong (3)
- Stephanie Villegas-Ross (49)
- Vicki Thompson (1)

Tracking Custom 404 pages in Google Analytics
It’s never a good thing when visitors to your website land on a 404 page. It can have an impact on conversion data, as well as decrease the chances of visitors returning to your site. On the other hand, if a 404 page isn’t set up in the first place then you are at risk of damaging your brand’s potential for online traffic, not to mention the brand itself.
As Strategic Digital Marketers, we always advocate 301 redirecting a 404 page to the most relevant content for that page. This will then transfer the power built up in the 404 page to the URL which has been identified as having the most relevant content to suit the search requirements of the user. However, the question you may want to ask yourself is “How do we ensure that we know when a page has a 404 error?” You may answer that question with “Well, we can always check Webmaster Tools.” Agreed. But what if the 404ing page is not a crawlable page? 404 pages can be created when someone shares a page on Twitter, for example, or via an e-mail. Google will not be able to crawl the page in these instances.
So what’s the solution?
By using event tracking, we are able to see the 404ing URL, the source and the keyword that the visitor came through to get to that page. If there is no 301 re-direct or if the keyword search volume is significant, then you may be justified in having a specific page for users coming to the website through that particular source. Still with me so far?
The next step is to put the tracking in place to serve these requirements. This will allow us to see which pages are 404ing in Google Analytics.
The code can be implemented within the <body> tag in the page source.
Script:
<script type=”text/javascript”>
var strPage = document.location.pathname;
var pageTracker = _gat.getTracker(“UA-*******-*”);
pageTracker._trackEvent(“Errors”,”404″,strPage,1);
</script>
The element above tells the search engines 3 things:
1. var strPage = document.location.pathname; – This tells Google the naming dimensions of the page to be included within the report i.e. URL, Keyword.
2. var pageTracker = _gat.getTracker(“UA-*******-*”); – This ensures that the events are recorded within the correct Google Analytics profile
3. pageTracker._trackEvent(“Errors”,”404″,strPage,1); – These are the event parameters that need to be shown within the Events report in Google Analytics. This will ensure that the URL and page dimensions are pulled into the report.
How this can be reported in Google Analytics
As a SEO Agency we ensure that we monitor the frequency of visits to 404 pages to ensure that the website is not punished for serving users with inappropriate content. It also allows us to see which areas of the website could benefit from additional content as well as possible keyword opportunities.
Let us know if you think this is important by commenting below. You can also meet up with us to discuss this in more detail by contacting us.
Save on Delicious