i am looking for a solution to include the google map widget (webflow) with an advanced privacy mode setting that requires the user to agree to the transfer of data before viewing the map.
As an example (but I didn’t get it to work):
I had already found a similar post when searching for a solution in the forum, but no answers can be found there:
The critical thing about it: The latest case law in Germany from August 2019 says that NO cookies may be loaded before the user has agreed to its use. This includes of course embedded functions like Google Maps.
I hope someone can help the community with this problem!
Hi there, I was looking for solutions for the same problem.
Since I was not able to find something, I developed a webflow component and a script as a solution.
This solution displays a consent layer, which you can be styled however you like.
You only need to make sure that the consent layer with the attribut bs_gmc=consent_layer and a button with the attribut bs_gmc=activate_button is present.
Inside the component is a div with the class ‘map’. Change the div’s attribute to customize the google maps div to your needs. This is where you add your api key and the latitude and longitude you want to display.
Google Maps calls and loading of the libraries is only made after the use clicks on the consent button!
How to reuse it:
You need to embedd this script in the site’s setting under Before </body> tag: