Quick Start
Get a working Maps widget on your page in under a minute.
If you're looking to build a one-off map for a specific event, simply use the map builder in your hub.
This page is for you to know how to generate these programmatically and at scale.
The minimum viable embed
You need two things: your affiliate ID and a destination.
<iframe
src="https://www.stay22.com/embed/gm?aid=<AID>&address=Bell+Centre+Montreal"
style="width: 100%; height: 380px; border: none;"
loading="lazy"
></iframe>Warning
Remember to replace the placeholder aid from this code. It's more common than you think.
That's it. Drop it in your HTML and you have an interactive accommodation map.
Using coordinates
If you have lat/lng, use them - they're more precise and skip the geocoding step:
<iframe
src="https://www.stay22.com/embed/gm?aid=<AID>&lat=45.4960&lng=-73.5693"
style="width: 100%; height: 380px; border: none;"
loading="lazy"
></iframe>Adding dates
If you're building a map around a specific event, then pre-filling the check in and check out dates will show live pricing and availability on the map's pins.
<iframe
src="https://www.stay22.com/embed/gm?aid=<AID>&address=Bell+Centre+Montreal&checkin=2026-08-15&checkout=2026-08-17"
style="width: 100%; height: 380px; border: none;"
loading="lazy"
></iframe>Adding tracking
Use campaign to distinguish where your bookings come from:
<iframe
src="https://www.stay22.com/embed/gm?aid=<AID>&address=Bell+Centre+Montreal&campaign=concert_page"
style="width: 100%; height: 380px; border: none;"
loading="lazy"
></iframe>Building the URL dynamically
Here is a simple javascript snippet to show you (or your LLM) how to build a map on your page with URLSearchParams:
function buildMapSrc({ aid, address, lat, lng, checkin, checkout, campaign }) {
const params = new URLSearchParams({ aid });
if (lat && lng) {
params.set('lat', lat);
params.set('lng', lng);
} else if (address) {
params.set('address', address);
}
if (checkin) params.set('checkin', checkin);
if (checkout) params.set('checkout', checkout);
if (campaign) params.set('campaign', campaign);
return `https://www.stay22.com/embed/gm?${params}`;
}Next steps
- Parameters - All available URL parameters
- Widescale - Deploy maps dynamically at scale
- Secrets