fbpx

Adding GA Tracking Code to 404 Pages

Do 404 Pages Have a GA Tracking Code?

Ensuring that your 404 error pages have a Google Analytics (GA) tracking code is crucial for monitoring user behavior and identifying broken links on your eCommerce site. Here’s how you can check and implement GA tracking on 404 pages for both Shopify and WordPress (WooCommerce).

Shopify

  1. Log in to your Shopify admin panel.
  2. Go to Online Store > Themes.
  3. Click Actions > Edit Code.
  4. In the Templates directory, locate and click on the 404.liquid file.
  5. Ensure that your GA tracking code is included in this file. If not, add the following snippet before the closing tag:
    
    
  6. Save the changes.

WordPress (WooCommerce)

  1. Log in to your WordPress admin panel.
  2. Go to Appearance > Theme Editor.
  3. In the right-hand sidebar, locate and click on the 404.php file.
  4. Ensure that your GA tracking code is included in this file. If not, add the following snippet before the closing tag:
    
    
  5. Save the changes.

By following these steps, you can ensure that your 404 error pages are properly tracked in Google Analytics, allowing you to monitor and improve your eCommerce site’s user experience.

Leave a Comment