How to Integrate Borlabs Cookie in Wordpress with WP Maps

15000+ live websites are using this google maps wordpress plugin.

How to Integrate Borlabs Cookie with WP Maps Pro

Welcome to our comprehensive guide on integrating Borlabs Cookie with WP Maps Pro! As a website owner, it’s crucial to ensure compliance with privacy regulations, and Borlabs Cookie is a powerful tool that helps you manage cookies and user consent. When combined with the advanced features of WP Maps Pro, you can create a seamless user experience while maintaining full control over cookies and data privacy. In this guide, we’ll walk you through the steps to integrate these two essential plugins, ensuring that your website not only provides valuable map functionalities but also adheres to the highest standards of data protection. Let’s get started!

The Importance of Hiding Google Maps Until Consent is Given

Borlabs cookies popup with Google Maps
Fig 1: Borlabs cookies popup with Google Maps

When it comes to privacy compliance and user consent, the integration of Google Maps on your website plays a crucial role. Google Maps can collect and process personal data, which requires you to obtain user consent in accordance with data protection regulations such as GDPR (General Data Protection Regulation) and the ePrivacy Directive.

Hiding Google Maps before asking for consent is an essential practice for several reasons:

  1. Data Protection Compliance: By showing Google Maps only after the user has given explicit consent, you ensure that your website is compliant with data protection laws. This practice respects the user’s right to control their personal data and builds trust with your audience.
  2. User Transparency: Informing users about the use of Google Maps and obtaining their consent before loading the map ensures transparency. Users appreciate knowing how their data is being used, and this proactive approach enhances the user experience.
  3. Avoiding Unwanted Data Collection: Some users may have concerns about the information Google Maps collects. By hiding the map until consent is given, you prevent any unintended data collection, providing a more privacy-focused browsing experience.
  4. Reducing Legal Risks: Failure to comply with data protection laws can lead to legal consequences, including fines. By following best practices, like obtaining proper consent, you mitigate potential legal risks for your website.

Configuring Borlabs Cookies for GDPR Compliance and WP Maps Pro

 

Part 1: Blocking WP Maps Pro Scripts

In this part, we will preemptively block the maps.google.com API call prior to obtaining user consent.

Step 1: Accessing Script Blocker

Borlabs cookies script blocker
Fig 2: Borlabs cookies script blocker
  1. Navigate to your WordPress admin dashboard and go to “Borlabs Cookies” > “Script Blocker.”
  2. Click on “Add New” to begin setting up the script blocking for Google Maps.

Step 2: Scanning the Page

Borlabs cookies page scan
Fig 3: Borlabs cookies page scan
  1. Choose the specific page or pages where you’ve integrated Google Maps using WP Maps Pro.
  2. Click on “Scan” to analyze the selected page.

Step 3: Script Blocker Setup

Borlabs cookies page scan completed
Fig 4: Borlabs cookies page scan completed

 

  1. Once the scan is complete, click on the “Next” button.
  2. Provide a unique ID and a descriptive Name for the script blocker.
  3. Enable the Status to activate the script blocker.
  4. In the “Additional JavaScript Handles” section on the same page, specifically block ‘wpgmp-google-api’ and ‘wpgmp-google-map-main.’

    Borlabs cookies script blocker page
    Fig 5: Borlabs cookies script blocker page
  5. Finally, click on “Create Script Blocker” to save the settings.

Step 4: Copy the “Unblock Code” from the “For Content Blocker” section.

borlabs cookies copy unblock code
Fig 6: Borlabs cookies copy unblock code
  1. After saving the Script Blocker, a corresponding “Unblock Code” will be generated.
  2. Keep this code safe; we’ll use it in Part 2.

Part 2 – Blocking Maps Output

This section delineates the straightforward steps for substituting the map output with a consent placeholder, which remains in place until the user’s consent is granted.

Step 1 – Edit Google Maps Content Blocker:

Borlabs Content Blocker Access
Fig 1.1: Borlabs Content Blocker Access
  1. Open your WordPress Dashboard and go to the “Borlabs Cookie > “Content Blocker” page and find “Google Maps. and Click the Edit icon.
  2. Scroll to the “Javascript” section and paste the copied unlock code in Part 1. Then turn on the “Execute Global code first” and write wpgmpInitMap(); in the “Initialization” input field. Please check the below figure for reference.

    Borlabs cookies paste unblock code
    Fig 6: Borlabs cookies paste unblock code

Step 2 – Copy the Shortcode:

Borlabs Content Blocker Copy Shortcode
Fig 1.3: Borlabs Content Blocker Copy Shortcode
  1. Copy the generated shortcode: [borlabs-cookie id="googlemaps" type="content-blocker"]...block this...[/borlabs-cookie]. from the “Content Blocker Setting” section.

Step 3 – Replace and Implement:

Borlabs Content Blocker Use Shortcode
Fig 1:4 Borlabs Content Blocker Use Shortcode
  1. Replace “…block this…” with your maps’ shortcode.
  2. For instance: [borlabs-cookie id="googlemaps" type="content-blocker"][put_wpgm id=1][/borlabs-cookie].
  3. Insert this shortcode onto your chosen WordPress page.

The Result: With this setup, Google Maps will only be loaded when the user gives their consent for external media, enhancing user privacy while still providing a great interactive experience.

Conclusion

By following these simple steps, you can seamlessly integrate Borlabs Cookies with WP Maps Pro, ensuring that Google Maps scripts are only loaded on your website when users explicitly provide their consent. This not only prioritizes user privacy but also makes your website compliant with data protection regulations.

Related Tutorials:

Was this article helpful?
YesNo

Install Plugin Now!

Buy this plugin exclusively on CodeCanyon! You’ll get free updates, full support, and if you’re not satisfied, we’ve got you covered with a 30-day money-back guarantee.