Back to Community

Why Isn't My ExactMetrics Tracking Code Showing Up? A Troubleshooting Guide

Content

If your ExactMetrics – Google Analytics Dashboard for WordPress (Website Stats Plugin) tracking code has suddenly vanished from your website's source code, you're not alone. This is a common issue that can prevent your site from recording valuable visitor data. Based on community reports and solutions, here are the most frequent causes and how to resolve them.

Why This Happens

The tracking code can disappear for several reasons, often related to conflicts with other software, incorrect settings, or caching. The most common cause is a setting within the plugin itself that excludes certain user roles from being tracked, which also hides the code from the source when you are logged in.

Common Solutions

1. Check If You Are Excluded from Tracking

This is by far the most common reason users cannot see their tracking code. The plugin has a feature to exclude tracking for specific user roles, like administrators. If you are logged in, the code will not be inserted on the page.

  • How to test: Always view your site's source code in an incognito or private browser window where you are not logged into WordPress. Alternatively, use a browser extension to view the page as a visitor would.
  • Plugin Setting: Navigate to ExactMetrics > Settings > Engagement and review the "Exclude from Analytics" settings. If "Exclude tracking for Administrators" is checked, administrators will not see the code while logged in.

2. Identify Code Conflicts (Duplicate or Missing Code)

Another plugin or your theme might be interfering by inserting its own tracking code or preventing ExactMetrics from doing its job.

  • How to test: Deactivate all other plugins temporarily and switch to a default WordPress theme (like Twenty Twenty-One). Then check your source code again. If the tracking code reappears, reactivate your plugins one by one to identify the culprit.
  • Look for duplicates: Search your page's source code (Ctrl+U) for "UA-" or "G-". If you find a tracking code that isn't yours, another plugin or your theme is likely inserting it. You must remove the duplicate code from its source.

3. Verify Your Tracking Settings

Ensure the plugin is properly configured to insert the code on your site.

  • Go to ExactMetrics > Settings > Engagement and confirm that "Install Analytics Code" is enabled.
  • Navigate to ExactMetrics > Settings > Advanced and ensure no paths are accidentally excluded.

4. Clear Authentication and Reconnect

An authentication error between your WordPress site and Google Analytics can cause the code to not generate.

  • Go to ExactMetrics > Settings > General and use the "Reconnect Google Analytics" button.
  • For Multisite Users: If the reset button is disabled, you must clear the authorization from the Network Admin dashboard (My Sites > Network Admin > ExactMetrics).

5. Investigate Server-Side Issues

In rare cases, server security rules can block the plugin from saving tracking settings.

  • If you receive a "Forbidden" error when saving tracking changes, the issue may be with your hosting provider's mod_security rules. Contact your host's support, provide them with the error, and ask if a specific rule is blocking the request.

Need More Help?

If these steps don't resolve the issue, check the ExactMetrics > Tools > Errors & Debug screen for any specific error messages. These logs can provide crucial clues. You can also search the WordPress.org support forums for your specific error message to see if other users have found a solution.

Related Support Threads Support