How to Turn On Debug Mode
Debugging Google Analytics helps you to troubleshoot and analyze tracking behavior for your site.
With MonsterInsights, enabling Google Analytics debug mode is super easy. Let’s take a detailed look at Google Analytics debug mode and how to enable it on your site.
While debug mode doesn’t affect tracking it does prevent measurement protocol hits, including eCommerce hits from going to Google Analytics.
Therefore, we’d prefer you contact us before using it so we can take a look and try to fix your issue and prevent you from missing out on any measurement protocol hits that your site is tracking.
Understanding Debug Mode
Debug mode allows you to check your Analytics tracking code for errors.
You may need to enable debug mode for many reasons, including:
- You want to make sure that your campaign is set up to the correct goal.
- Your ecommerce reporting doesn’t match your sales.
- You suspect that your file downloads are not properly being tracked.
However, you should enable it only when you’re testing and debugging.
Step 1: Enable Debug Mode in MonsterInsights
To enable debug mode, navigate to Insights » Settings » Tracking » Compatibility. Then, select the checkbox near Enable Debug Mode. Finally, click on Save Changes.
Step 2: How to Find Your Error Log
That’s it! You’ve now turned on debug mode.
Your analytics will still record your traffic normally, but now any errors will be recorded to your PHP error log. You can access your PHP error log file by logging in to your web hosting account. In case your hosting provider doesn’t provide access to error logs, you’ll need to ask your hosting company to give you access.
You can also view Analytics debug mode in action on your website. To do that, first you need to visit your site on the Chrome browser. Then, right click and select Inspect.
Now click on the Console tab.
Aside from showing warnings and error messages, it also shows a breakdown of each hit sent to Google Analytics, which helps you to analyze what’s being tracked. When the debugger runs, any Analytics error will be shown in red. You can find a comprehensive list of possible errors here.
After testing and debugging, be sure to turn off debug mode on your site by unchecking the box you checked in step 1.