I have a simple web site page with a map (from Google Maps) embedded into an iFrame.
<iframe src="https://www.google.com/maps/embed? .... ></iframe>
See Fiddle as example.
Embedding the map into the page results in Google's cookies being stored on the client's browser.
Is there any way to avoid that?
Why I'm asking this:
in the EU a web site that stores 3rd party cookies on the user's device is required to get informed consent from the user and give her/him discretion to read a long document about cookies and privacy. See Cookies - European commission
A web site that uses only session cookies (non persistent) is not required to get informed consent.
There are many simple websites whose purpose is just to give basic online presence to commercial activities such as restaurants, shops and so on.
Normally those websites only need session cookies (or no cookies at all).
However as many of them use embedded Google Maps' maps to show their location they automatically fall into the category of "websites that stores 3rd party cookies" and must obey all the EU obligations regarding that. I think too much overhead for just displaying a map.
As just mentioned, Google Maps sets non-essential cookies (as of 2021, especially the NID and SID cookies). These store user information by means of an individual user ID. To legally obtain consent for cookies, it is recommended to use Google Maps in combination with a cookie consent tool like Real Cookie Banner.
Google Maps has a "Share or embed map" feature that provides users with the map's HTML code so that they can insert it into their website's code. You can embed a map view image, a street view image, or even specific directions for a route.
You can access the full google map by clicking the "View Larger Map" icon in the upper right corner of the map embedded on the page you shared. Here is the url. In the google map, if you go to the top of the legend and click the three vertical dots, the menu will display the option "Download KML".
Maybe you can use cookieless google maps v3:
https://mapsplatform.googleblog.com/2011/10/a-grab-bag-of-maps-api-news.html
The eagle eyed amongst you may have spotted that we have updated all of our documentation to recommend that the Maps APIs be loaded from maps.googleapis.com rather than maps.google.com or maps-api-ssl.google.com. When loaded from maps.googleapis.com, the current implementation of the Maps API v3 does not rely on the exchange of cookies with Google. This improves both the security of the API, and the performance on bandwidth constrained networks. We therefore recommend all sites switch to using maps.googleapis.com.
Link to tutorial:
https://developers.google.com/maps/documentation/javascript/adding-a-google-map
I've found a very fast way of doing this, which could be also helpful. This site creates a cookie less iframe which can be place for instance, in a visual composer for wordpress maps container https://www.uwp.is.ed.ac.uk/3rd-party-widgets/maps/
I've tested it and it won't load NID cookie, so no need to get consent for it.
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With