Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Google Maps embed loading on every page: how to fix it

PRF-085Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A map embed is usually an <iframe> pointing at google.com/maps. The browser treats it like a full mini web page. It downloads its own HTML, JavaScript, styles, fonts and map tiles.

The problem is eager loading: the map starts downloading as soon as the page loads, whether or not the visitor ever sees it. This often happens when the map sits in a footer, a site-wide widget or a shared template, so every page pays for it.

Why it costs you leads or sales

The map competes with your form, button and images for bandwidth and the browser's attention. On a slow mobile connection that can delay the parts of the page that matter. It also adds requests and page weight, and it sets third-party cookies or makes calls to Google that may need consent under privacy rules in some regions.

The impact is usually small on a single page, which is why this is rated low. It adds up on landing pages where speed matters and the map has no purpose.

Where the cost lands
  1. Page requestVisitor opens a landing page
  2. Map iframe startsLoads straight away from the footer
  3. Bandwidth sharedForm, hero image and scripts slow down
  4. Slower pageVisitor may leave before acting

The map downloads early and competes with the content that drives the conversion.

How to check if your site has it

Check in your browser
  1. Open DevTools

    In Chrome, press F12 and go to the Network tab. Tick Disable cache.

  2. Reload a page without a map

    Pick a page where the map is not visible, such as the home page or a landing page. Do not scroll.

  3. Filter for map requests

    Type maps in the filter box. Requests to google.com/maps or maps.googleapis.com before you scroll mean the map loads eagerly.

  4. Check the source

    Search the page source for <iframe and google.com/maps. Look at whether the iframe has loading="lazy".

  5. Run Lighthouse

    In the Lighthouse tab, run a mobile report. Warnings such as Defer offscreen images or Reduce the impact of third-party code can point at the map.

How to fix it

There are three options, from simplest to most effective. Use the first on pages that need a live map, and the second or third where the map is optional.

Option 1: lazy-load the iframehtml
<iframe
  src="https://www.google.com/maps/embed?pb=YOUR_EMBED_CODE"
  title="Map showing our office location"
  width="600" height="450"
  style="border:0"
  loading="lazy"
  referrerpolicy="no-referrer-when-downgrade"
  allowfullscreen></iframe>
Option 2: click-to-load facadehtml
<div id="map-facade" style="width:600px;max-width:100%;height:450px;background:#e5e5e5 url('/images/map-preview.jpg') center/cover;display:flex;align-items:center;justify-content:center">
  <button type="button" id="load-map">Load map</button>
</div>
<script>
  document.getElementById('load-map').addEventListener('click', function () {
    var f = document.createElement('iframe');
    f.src = 'https://www.google.com/maps/embed?pb=YOUR_EMBED_CODE';
    f.title = 'Map showing our office location';
    f.width = '100%'; f.height = '450'; f.style.border = '0';
    document.getElementById('map-facade').replaceWith(f);
  });
</script>

Option 3: remove the map from pages that do not need it, and keep it on the contact or location page only. Where a visitor just needs directions, a plain link to Google Maps costs nothing to load.

Where to make the change
  1. Find where the map lives

    Check Appearance > Editor (or Widgets) for the footer, and your page builder's global sections. Search the theme's footer.php for google.com/maps.

  2. Add lazy loading

    Edit the Custom HTML block or widget and add loading="lazy" to the iframe. Or remove the map from the shared footer and place it only on the contact page.

Map loading before and after

Before

  • Map iframe in the footer of every page
  • Google requests start on page load
  • No loading attribute

After

  • Map only on the contact page
  • loading="lazy" or a click-to-load facade
  • No Google map requests until needed

How to confirm it's fixed

Confirmation checks
  • Reload a page without a map with the Network tab open: no google.com/maps requests appear.
  • On the contact page, the map requests start only when you scroll near it, or after you click the facade.
  • The map still displays and works on desktop and mobile.
  • Total requests and transferred size in the Network tab are lower than before.
  • A new Lighthouse mobile run no longer flags the map as a third-party cost.

How to prevent it happening again

Habits that keep it away
  • Put maps on the pages that need them, not in global footers or symbols.
  • Add loading="lazy" to every third-party iframe as a standing rule.
  • Run a quick Network tab check on a key landing page after theme or builder changes.
  • Review third-party requests on landing pages each quarter.

How FunnelGuard handles this

FunnelGuard does not check for eager map embeds yet. It is a possible future check. Today FunnelGuard runs your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and confirms each step works and tracking hits are sent. If a heavy embed broke a step, for example by blocking a button, that failure would show up in the journey.

To watch for this issue yourself, run Lighthouse or PageSpeed Insights on your key landing pages after each site change, and check the Network tab for google.com/maps requests before scrolling. A free read-only FunnelGuard website audit is also available, but it is not a map check.

Frequently asked questions

Questions people ask

Why is my Google Maps embed slowing down my website?

A Google Maps iframe loads its own scripts, styles, fonts and map tiles. If it loads when the page opens, those requests compete with your content. Lazy-loading it or loading it on click removes that cost until the visitor needs the map.

How do I lazy load a Google Maps iframe?

Add loading="lazy" to the iframe tag. The browser then waits until the map is near the viewport before downloading it. Give the iframe a set width and height so the page does not shift.

Should I put a Google Maps embed in my footer?

Usually not. A footer map loads on every page, including landing pages where it has no use. Put the map on the contact or location page, and use a text address and a directions link elsewhere.

Does loading="lazy" work on iframes?

Yes, current major browsers support it on iframes. Browsers that do not support it ignore the attribute and load the map normally, so it is safe to add.

What is a click-to-load map facade?

It is a static image of the map with a button. The real Google Maps iframe is only created when the visitor clicks. This avoids all map requests for people who never interact with it.

Can a Google Maps embed affect GDPR or cookie consent?

It can. Loading Google content contacts Google servers and may involve cookies, so some sites hold the map until the visitor consents or clicks. Check your own legal requirements and consent setup.

Does FunnelGuard check for map embeds loading on every page?

No, not yet. It is a possible future check. You can spot it with the Network tab in Chrome DevTools or a Lighthouse report.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.