Back to Community

Troubleshooting ExactMetrics Opt-Out Functionality: Common Issues and Solutions

Content

If you're using the ExactMetrics plugin to handle Google Analytics user opt-out for GDPR compliance, you might have encountered some issues getting it to work correctly. Based on community reports, several common problems can prevent the opt-out feature from functioning as expected. This guide will walk you through the most frequent issues and their solutions.

Common Problem 1: The Opt-Out Button or Link Doesn't Appear

Many users report that the shortcode [gadwp_useroptout] doesn't render a button or link and instead just displays the raw shortcode text.

Why This Happens:

  • User Role Exclusion: The ExactMetrics plugin does not execute the opt-out shortcode for user roles that have been excluded from tracking. If you are logged in as an administrator (a role often excluded by default), you will not see the button.
  • Caching: Aggressive page caching or browser caching can sometimes prevent the shortcode from being processed correctly and the button from displaying.

How to Fix It:

  • Test While Logged Out: Always test the functionality in a private/incognito browser window where you are not logged into your WordPress site. This is the most reliable way to see what a regular visitor experiences.
  • Clear All Caches: Clear your browser cache completely. Furthermore, clear any server-side or plugin-based caches (e.g., from SG Optimizer, W3 Total Cache, WP Rocket).

Common Problem 2: No Visual Feedback After Clicking the Button

Users click the opt-out button, but nothing seems to happen—there is no success message or visual indication that the opt-out was successful.

Why This Happens:

  • The default opt-out script provided by the plugin is minimalistic. Its primary function is to set a cookie that blocks the Google Analytics tracking script. It does not include a built-in function to display a confirmation message or change the button's appearance.

How to Fix It:

  • Manual JavaScript Enhancement: To improve user experience, you can add a confirmation message and a page reload. A user in the community suggested modifying the gaOptout() function to include location.reload(true); to immediately refresh the page after the cookie is set. You would need to add this custom code to your site, typically in a custom JavaScript file.
  • Note: Implementing advanced toggle-button functionality with changing text requires significant custom development beyond the plugin's core feature set.

Common Problem 3: Confusion Over Duplicate Settings

There is potential for confusion as there have been two separate settings labelled “enable support for user opt-out” in the plugin's settings.

Why This Happens:

  • This appears to have been a UI oversight in a past version of the plugin, where one setting was located in the "Advanced Settings" tab and another was found at the bottom of every tab.

How to Fix It:

  • Ensure you are using the latest version of the ExactMetrics plugin, as the development team has acknowledged this issue and indicated it would be fixed in a subsequent release.
  • If you are on an older version, try enabling both opt-out settings to ensure the feature is activated.

Common Problem 4: User Still Appears in Real-Time Reports After Opt-Out

A user clicks the opt-out link and receives a message, but they can still see their own active session in the Google Analytics Real-Time report.

Why This Happens:

  • The opt-out cookie prevents future pageviews from being sent to Google Analytics. The pageview for the page where the user clicked the opt-out link was already sent before the cookie was set. The user would need to navigate to a new page for the blocking to take full effect.

How to Fix It:

  • After clicking the opt-out button, navigate to another page on the site. Your visit to that new page should not be recorded in the Real-Time report.

Important Notes on GDPR Compliance

It is crucial to understand what the ExactMetrics opt-out feature does and does not do:

  • It Provides a Tool, Not a Solution: The plugin gives you the shortcode to create an opt-out mechanism. It is the website owner's responsibility to integrate this button or link into their privacy policy or cookie consent banner as required by law.
  • It Does Not Create a Consent Banner: The free version of ExactMetrics does not include a pop-up banner that asks users for consent. This functionality is only available in the Pro version's EU Compliance addon.

By methodically working through these common issues—testing while logged out, clearing caches, and understanding how the opt-out cookie works—you should be able to resolve most problems with the ExactMetrics user opt-out feature.