Embedding Google Maps on Your Contact Page Without Slowing It Down
Short answer: A map on your contact page helps visitors find you, but the default embed loads a lot of script and image data before anyone touches it. You have three better options: lazy-load the iframe so it loads only when it nears the screen, show a placeholder that loads the map on click, or use a static image of the map with a directions link. The click-to-load option usually gives the best balance of speed and privacy, because the map loads only when the visitor asks for it. Whichever you choose, add a title to the iframe and a plain text address above it.
Why a default embed costs you
When you copy the embed code from Google Maps, you get an iframe that points to a Google page. That page loads its own scripts, styles and map tiles. Some of the work happens even when the map is far below the fold, which competes with your own content for the browser's attention. The map also sends requests that can include the visitor's address and cookies, which matters for privacy.
Measure this yourself before you change anything. Open your contact page in Chrome, press F12, go to the Network panel, reload with the cache cleared, and note how many requests and megabytes come from the map domain. Then compare after each change.
Option 1: lazy-load the iframe
Add the loading attribute to the iframe so the browser waits until the map is close to the visible area. Give it a title that describes it, which screen reader users need:
<iframe
src="https://www.google.com/maps/embed?pb=PLACEHOLDER"
width="100%"
height="320"
loading="lazy"
title="Map showing our workshop in Limerick">
</iframe>
Replace the placeholder source with the address Google gives you when you choose Share, then Embed a map. Lazy loading helps the first view of the page, but a visitor who scrolls down will still trigger the map. It is a good option when the map is not the most important thing on the page.
Option 2: click to load the map
Show a simple box with a static image, the address in text, and a button labelled "Show map". Only when the visitor presses the button does your script replace the box with the iframe. This keeps the initial page light and gives the visitor control over whether third-party content loads.
Keep the button and the address visible in plain HTML, so the page still works if the script fails. Use a short script to swap the placeholder for the iframe, and write it so it runs only once.
Option 3: a static image with a directions link
Take a screenshot or export an image of the map area, save it as an optimised image, and add alt text that describes the location. Link the image to a directions URL, such as the Google Maps directions address with your destination. This loads nothing from Google until the visitor taps the link, and it is the lightest option.
The trade-off is that the map is not interactive. For a shop or a clinic that people visit once, that rarely matters. For a business with several branches, an interactive map may be more useful.
Privacy in the EU
If your visitors are in the EU or the European Economic Area, the embed may set cookies or pass visitor data to Google, which can require consent under local rules. A click-to-load placeholder is a common way to avoid loading third-party content before the visitor has agreed to it. Check the requirements with your privacy adviser, because the details depend on how your business uses the data and on your cookie banner.
Whatever you choose, state the address and the phone number in plain text on the page. Visitors who do not want to load a map should still be able to find you.
Accessibility checks
- The iframe has a title that describes the content.
- The address appears as text above or below the map.
- The directions link has clear wording, such as "Get directions to our Limerick workshop", rather than "click here".
- The button in the click-to-load option can be reached with a keyboard and has a visible focus outline.
A quick comparison
| Option | First load weight | Visitor control | Interactive | Best for |
|---|---|---|---|---|
| Default embed | Highest | None | Yes | Sites with no speed or privacy concerns |
| Lazy-loaded iframe | Lower | None | Yes | Pages where the map is a secondary feature |
| Click to load | Lowest | Full | Yes, after clicking | EU sites and speed-sensitive pages |
| Static image | Lowest | Full | No | Single locations with simple access |
Mobile layout
On a phone, a map that fills the full width can trap a finger, because a swipe on the map moves the map rather than the page. Give the map a fixed height, usually around 250 to 320 pixels on a phone, and place it below the address and the directions link, so the visitor reads the text before deciding to interact. Test scrolling on a real device, and check that the cookie banner does not sit on top of the map controls.
Keep the form and the phone number above the map as well. Many visitors on a phone want to call or write, not explore the area.
FAQ
Does a Google Maps embed hurt my search rankings?
Not directly. Its speed cost can affect the experience, which matters more than the map itself.
Can I change the size of the map?
Yes, set the width and height to suit your layout. A wide, short map on a phone is easier to use than a tall one that pushes the form down.
Should I use the Maps Embed API instead?
The Embed API requires its own key and setup. For a single location, the standard embed or a static option is usually enough. If you choose the API, keep the key on the server side, not in public page code.
Will a static image look out of date?
Refresh it when the street layout or your entrance changes, and set a reminder to check it once a year.
If you would like us to set up the map so it loads quickly and meets your privacy requirements, tell us about the page and where your visitors are.