Back to Community

Troubleshooting Google Maps and Other Map Blocking Issues in Complianz

36 threads Sep 17, 2025 PluginComplianz – gdpr/ccpa cookie consent

Content

If you're using the Complianz plugin on your WordPress site, you might encounter issues where Google Maps, OpenStreetMap (OSM), or other map services don't display correctly. This is a common point of confusion, as the plugin's core function is to block such services until a user provides consent. This article explains why these issues occur and provides the most effective solutions based on community experience.

Why Do Maps Disappear or Not Load with Complianz?

The primary purpose of the Complianz plugin is to ensure compliance with privacy regulations like GDPR and CCPA. A key part of this is blocking services that place marketing or tracking cookies—like Google Maps—until a user explicitly consents to them. This expected behavior can sometimes manifest in ways that seem like bugs:

  • Blank Space Instead of a Placeholder: The map is blocked, but no placeholder image or "Accept Cookies" button appears, leaving an empty gap on the page.
  • Map Fails to Load After Consent: The user accepts cookies, but the map still doesn't appear, often requiring a manual page refresh.
  • Console Errors: Errors like Uncaught ReferenceError: google is not defined appear in the browser's console, indicating a script loading problem.
  • Layout Issues: The placeholder might inject HTML elements that disrupt your page's styling.

These problems are almost always due to one of two reasons: a missing integration for your specific map plugin/theme or a styling conflict with the placeholder.

Common Solutions for Map Issues

1. Check and Configure Integrations

Complianz has built-in integrations for many popular map plugins and themes. If your specific tool isn't supported, the blocking may not work correctly.

  • Navigate to: Complianz -> Integrations -> Services.
  • Ensure: The "Google Maps" service is enabled and the "Placeholder" checkbox is ticked.
  • Then check: Complianz -> Integrations -> Plugins for any specific integration related to your map plugin (e.g., WP Store Locator, Modern Events Calendar). Enable it if available.

2. Verify Placeholder Settings

A placeholder should appear where the map is blocked. If it doesn't, a simple setting might be disabled.

  • Navigate to: Complianz -> Settings -> Cookies.
  • Ensure: The setting "Disable placeholder insertion" is NOT enabled.

3. Apply a CSS Fix for Placeholder Styling

If the placeholder appears but breaks your layout (e.g., doesn't respect the container's height), custom CSS can often resolve it. This is a frequent fix for maps in page builders like Oxygen or Divi.

.cmplz-placeholder-parent {
    height: inherit;
}

Add this code to your theme's "Additional CSS" section or your page builder's custom CSS field.

4. Create a Custom Integration (For Developers or Custom Code)

If there is no pre-built integration for your map solution, you will need to create a custom one. This is common for custom-coded maps, lesser-known plugins, or maps loaded via AJAX.

The Complianz team provides a detailed developer's guide for debugging Google Maps. The guide explains how to identify the scripts to block and how to write a Must-Use (mu-)plugin to handle the blocking and reloading process correctly.

5. Force a Page Reload After Consent

For maps that load correctly on the first visit but fail after a page refresh (or vice versa), a simple workaround is to force the page to reload once the user gives consent. This can ensure all scripts are re-executed in the correct order. This typically requires adding a small code snippet via a mu-plugin.

When to Suspect a Different Problem

If you have tried the steps above and your map still does not function, consider these possibilities:

  • Caching: Always clear your website's cache and your browser's cache after making any changes.
  • Plugin Conflicts: Temporarily disable other plugins to test for a conflict. A performance or optimization plugin might be interfering with how Complianz blocks and reloads scripts.
  • Theme Conflicts: Test with a default WordPress theme (like Twenty Twenty-Four) to rule out an issue specific to your theme.

Successfully managing maps with Complianz often comes down to ensuring the plugin correctly identifies and handles the scripts from your specific map implementation. Using the built-in integrations and applying targeted CSS or custom code for unique setups will resolve the vast majority of issues.

Related Support Threads Support