Tuesday, 16 May 2017

Track 404 Errors on your Website with Google Analytics

Track 404 Errors on your Website with Google Analytics

If you change the URL of an existing page on your website, or delete it completely, visitors will get a 404 or “File Not Found” error when they try to access that page. The other reason why you have end up having 404 pages on your site is not in your control. Say your page URL is abc.com/xyz and another site links to that page but with a wrong URL, visitors will get a 404 when they click that link.

It is important that you fix your 404 errors are they offer a bad visitor experience and your site may also lose Google juice. Google gives you points for every incoming link but the benefit is lost if that link is pointing to a non-existent 404 page.

TRACK THE MISSING 404 PAGES ON YOUR SITE

If you are using Google Analytics, which you most likely are, you can use the same service to easily keep a track of all the 404 missing pages on your website.



You take your standard Analytics tracking code, the one that is already on your web pages, and add a few extra lines inside the script tag that will enable tracking for 404s. The modified code will generate a virtual pageview in your Analytics reports (see the above screenshot) that will not only provide you with the URL of the missing page on your website but also the URL of the referring site.

<script>

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  /* Standard Analytics Code */
  ga('create', 'UA-XXXXX-YY', 'domain.com');
  ga('send', 'pageview');

  /* Track 404 Errors */
  var url = "/404/?url=" + window.location.pathname + window.location.search + "&from=" + document.referrer;
  ga('send', 'pageview', url);

</script>
Please note that this code should only be added to your 404 template and not every page.

To get a report of all the 404 pages on your site, go to your Google Analytics dashboard and choose Behaviour -> Site Content -> All Pages. Here select any date range and put /404 in the search box and you’ll know what’s missing from your site.

Also, since Google Analytics now offer near real time tracking, you’ll know about the 404 pages on your website as they happen.

FIND 404 PAGES IN WEBMASTER TOOLS

If you are not using Google Analytics, or if you do not have to option to modify the code in your web pages, you can use Google Webmaster tools to find the 404 pages on your website. Once you have added and verified your site with the Google Webmaster panel, go to Dashboard –> Diagnostics –> Crawl Errors and select the “Not found” option.

Here you’ll see a list of all pages that returned a 404 status code to Google while it was trying to index your site.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Labels

404 AdBlock Add-on Airtel GPRS Trick Airtel SMS Trick Alexa Amazon Amazon Kindle Amazon Prime Android Android 8 Android Oreo antivirus Apple Apple Mac ASCII Audacity Audio Authotkey Backup Balance Transfer in Vodafone Battery Bing Blogger Blogging Bookmarklet Browser Camera Chromebook clock Cloud colors command lines Computer Computer Tricks configuration Contact Creative Commons Credit Card CSS devolop DIY Doodle DOS Download Dropbox E-Mail eBook Email Email Attachment Embed Encryption English Error Evernote Eyes Facebook Facebook Tricks Feedburner Flipkart Font Foursquare Free Internet Free sms trick in Vodafone G Mail Gadget Game Getty Images GIF Gists Github Google Google AdSense Google Analytics Google Apps Google Chrome Google Contacts Google Currents Google DNS Google Docs Google Drive Google Earth Google Font Google Forms Google Images Google Map Google Photos Google Play Store Google Plus Google Print Google Reader Google Script Google Sheets Google Spreadsheet Google Translate GPRS Setting GPS Hacking Health App HelloFax Hindi Hoodie HTML Icons idea Image Editing Images IMEI Indian Railways Infographics Instagram Internet Internet Explorer Internet Tricks iOS iPad iPhone IRCTC iTunes iTV JavaScript JioCinema JioTV Junglee Kindle Language Translation Laptop Laptop. TV Life Time FREE GPRS Life-Style Link Linkedln Linux logo Make Money Online Microdoft Powerpoint Microdoft Word Microsoft Office Microsoft Outlook Mobile Mosaic Music Name Networking nexus Notepad OCR Online Shopping Open DNS OS Outlook Password PDF Petya Phillips Hue Lights Photogtraphy Pixel Play Station Podcasts Pokemon Pokemon Go Polls Print Productivity Proxy Server Pushbullet QR Code Ransomware Reddit Reliance Hack GPRS Reliance Jio RGB Ringtone Router RSS Safe Mode Samsung Galaxy S Scrabble Screen Capture Screen Sharing Screencast Secrets Security Send free sms from PC SEO Sierra Skype Slideshare SMBv1 SMS Snapchat Snapdeal Social Media Solution Sound Device Speech Recognition Sql Steam Sync Synology NAS Tata Docomo GPRS trick Teleprompter Torrent Trick Tricks TV Twitter UltraISO Unicode Unknown Extension Unlimited 2GB Unlimited 3GB Unlimited GPRS USB USB Security Key Video Editing virtual desktop Virus attack VLC Vodafone 110% working trick for GPRS Vodafone 3g Vodafone GPRS VPN wallpapers WannaCry Web Design Web Domain Website Wget Whatsapp WiFi Wikipedia Windows Windows 10 Windows 10 S Windows KN Windows Tricks windows updates Winows N Wolfarm Alpha WordPress XBox YouTube Zip
Twitter Delicious Facebook Digg Stumbleupon Favorites More