Appearance
Interface: PromotionData
Payload for the two promotion events emitted by the iframe runtime when a user interacts with a promotion surface authored in the Mapsted CMS (banners, deal cards, sponsored POI tiles, etc.):
promotionClick— fires the moment the promotion surface is clicked or tapped. Use this for analytics, deep-link routing, or to overlay a confirmation/coupon UI on top of the map.promotionDetails— fires when the iframe opens its built-in detail view for the promotion (e.g. a "View deal" expansion). Use this if you'd rather suppress the iframe-native detail UI and render your own panel against the host page chrome.
Both events deliver the same PromotionData shape so a single handler can route by event name.
Example
ts
import { on } from '@mapsted/maps-js-api';
on('promotionClick', (promo) => {
if (promo.entity) {
analytics.track('promo_click', {
entity_id: promo.entity.entityId,
});
navigateToDealPage(promo.entity.entityId);
}
});See Promotions on map for a full banner-on-map UI walkthrough.
Indexable
ts
[key: string]: unknownAdditional CMS-authored metadata forwarded verbatim from the iframe runtime. Common keys observed in production payloads:
imageUrl?: string— promotion artwork (CMS-uploaded)headline?: string/subheadline?: string— display textctaText?: string/ctaUrl?: string— call-to-actionvalidFrom?: string/validTo?: string— ISO 8601 windowtenantId?: string— multi-tenant property scoping
Treat the index signature as unknown and narrow at the call site — the CMS schema is the source of truth and may vary by property tenant.
Properties
| Property | Type | Description |
|---|---|---|
entity? | EntityData | Mapsted entity bound to this promotion (POI, building, floor, etc.). The id field is stable across sessions and is the canonical key to forward to your back-end deal/coupon system. |