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.

We highly recommend contacting support before using debug mode.

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.

Turning on debug mode in MonsterInsights will load a special version of the Google Analytics JavaScript, analytics_debug.js. This debug version will automatically record detailed error messages to help you troubleshoot any issues.

 

 Keep in mind that enabling debug mode will not affect your regular site traffic, or your Google Analytics tracking. The debug version is loaded to only those user roles who have the ability to view and save the settings panel of MonsterInsights.

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.

Enable Debug Mode - MonsterInsights

 

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.

right click on the page, then click on inspect element

Now click on the Console tab.

click browser console

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.