Skip to content

Cookie consent

Google Maps embeds and the GDPR: how to show a map with consent

By the Kiescy teamUpdated 6 min readChecked against the official text on

Almost every local business has a "Find us" map on its contact page. With Google Maps, that map is Google's code running inside your page: as soon as the page opens, the visitor's browser fetches map tiles and scripts from Google and sends their IP address along.

This guide explains why that matters under the GDPR and the cookie rules, how to make the map wait for consent without breaking the page, and three ways to show your location that don't need consent at all.

The short version

An embedded Google Map isn't automatically non-compliant, but for EU and UK visitors it should wait for consent. The embed contacts Google as soon as the page loads, sending the visitor's IP address, and it can store data on the device, which the ePrivacy rules allow only with consent unless strictly necessary. Show a click-to-load placeholder, or use a static map image or a plain link to Google Maps, which need no consent.

Words you'll see in this guide (4)
Maps embed:
A Google Map placed on your page with an <iframe> from google.com/maps/embed, or with the Maps JavaScript API.
Click-to-load placeholder:
An image or box shown in place of the map. The real map only loads when the visitor clicks or allows the cookie category.
Static map:
A plain image of the map. If you save it on your own server, it shows your location without contacting Google when the page loads.
Strictly necessary:
The ePrivacy exception for storage the visitor needs for a service they asked for. A map they haven't asked to see usually isn't that.
On this page
  1. Why it needs consent
  2. Click-to-load setup
  3. No-consent options
  4. Your privacy policy
  5. Test it
  6. Questions
  7. Sources

Why a Google Maps embed needs consent

Two things happen when a page with an embedded map loads, before the visitor touches the map:

  • The visitor's data goes to Google. The browser requests the map from Google's servers, which receive the visitor's IP address and device details. An IP address can be personal data under the GDPR (Article 4(1) and recital 30), so you need a legal basis for sending it.
  • Data can be stored on the device. The map's scripts can set cookies or use browser storage. Article 5(3) of the ePrivacy Directive, and PECR in the UK, allow that without consent only when it's strictly necessary for something the visitor asked for.

Some site owners argue a map is necessary for a contact page. That's hard to defend when the same page already shows your address in text, and most consent tools and data protection authorities put maps in a consent category. The safe reading: load the map once the visitor wants it.

Example

A dental practice in Munich has its address, phone number and a Google Map on the contact page. Every visitor's IP address goes to Google before they've read a word. With a placeholder, the page shows the address and a "Show map" button; Google is only contacted for visitors who press it.

Google doesn't publish a list of the cookies a Maps embed sets, and what you see can change with the visitor's Google sign-in and region. Don't rely on a third-party cookie list; check your own page with DevTools, as shown at the end of this guide.

How to add a click-to-load map

A placeholder box saying This map is hosted by Google, loading it lets Google set cookies, with a Show map button. Until the visitor clicks or allows the category, no request goes to Google. After that, the map loads.This map is hosted by GoogleLoading it lets Google set cookiesShow mapNo request to Google yetafter click or consentEmbed loads, cookies set
The same pattern works for maps, videos and other embeds.

With Kiescy

Copy the map's embed code from Google Maps (Share → Embed a map), then rename src to data-pira-src and add a category. Kiescy keeps the address off the iframe until the visitor allows that category:

Map that waits for consent
<iframe
  data-pira-category="performance"
  data-pira-src="https://www.google.com/maps/embed?pb=YOUR_MAP_CODE"
  title="Map showing our office"
  width="600" height="400"
  loading="lazy"
  referrerpolicy="no-referrer-when-downgrade"></iframe>

Pick the category that matches how you describe the map in your banner and cookie policy. Many sites use a functional or preferences category (Kiescy's is "Performance & functionality", performance in code); others group maps with videos under "social" or "marketing". Either is fine if your banner text says so.

Once released, the iframe gets data-pira-released="1", so you can style the waiting state:

Placeholder styling
iframe[data-pira-category]:not([data-pira-released]) {
  background: #f4f4f5 url(/img/map-placeholder.png) center / cover;
}

Tip: Make the placeholder image yourself: a screenshot of your area, saved on your server, with your address on top. Don't hot-link a map image from Google, or you've contacted Google before consent.

Maps JavaScript API

If a developer loads the Maps JavaScript API for a store locator, load the script only after consent. With Kiescy, wrap the loader: pira.when('performance', () => { /* add the Maps script and draw the map */ }).

What to say in your privacy policy

Name Google as a third party that provides maps, say what it receives when the map loads (IP address, device and browser data, and interactions with the map), that it loads only after consent, and link to Google's privacy policy. List the map under the same category in your banner and in your cookie policy. Cookie policy vs privacy policy explains what goes where, and GDPR cookie categories covers choosing the category.

How to check your map waits

  1. Open your contact page in a private window and open DevTools → Network.
  2. Filter for google and reload. Before you agree to anything, there should be no requests to google.com/maps, maps.googleapis.com or gstatic.com.
  3. Allow the category or click the placeholder. The map requests should appear now.

Our guide to checking which cookies a website sets walks through it in every browser, and the free website check does it for you. Videos work the same way: see YouTube embeds and the GDPR.

Questions

Is Google Maps GDPR compliant?

Google Maps can be used in a compliant way, but an embed that loads on page open sends visitors' data to Google before they've agreed. For EU and UK visitors, load it after consent or use a link or static image.

Is a Google Map a strictly necessary cookie?

Usually not. Your address in text already tells visitors where you are, so the interactive map is an extra. Most consent tools and regulators treat it as needing consent.

Does a Google Maps link need consent?

No. A plain link sends nothing to Google until the visitor clicks it, and then they're on Google's own site.

Which cookie category should Google Maps go in?

There's no fixed rule. Functional or preferences is common; some sites use marketing. Use the same category in your banner and your cookie policy.

Do I need consent for Google Maps in the US?

There's no general US consent rule for maps. Mention Google Maps in your privacy policy.

Sources

The facts in this guide come from these official sources, last checked on . We review the guide whenever they change.

  1. ePrivacy Directive 2002/58/EC, Article 5(3) (EUR-Lex)
  2. General Data Protection Regulation (EU) 2016/679, Articles 4(1) and 6(1), recital 30 (EUR-Lex)
  3. Google Maps Platform: Maps URLs (links that open Google Maps)

Does your map load before consent?

Our free check opens your contact page as a first-time visitor and lists every request to Google before anyone agrees.

Open the free tool

This guide explains the law in general terms and isn't legal advice. Laws change and how they apply depends on your situation; for high-risk processing, ask a lawyer.

Keep reading

All guides

Get compliant this afternoon, not this quarter.

Set up your policies, banner and request form in one place. Free while Kiescy is in early access.