UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

66 lines • 2.66 kB
import { type Consent } from '@expofp/config'; declare global { interface Window { dataLayer?: unknown[]; gtag?: typeof gtag; [gaDisable: `ga-disable-${string}`]: boolean | undefined; } } export default function gtag(...args: any[]): void; export declare enum GaEventActions { Load = "Load floor plan", ViewBooth = "View booth", ViewExhibitor = "View exhibitor", ViewCategory = "View category", Search = "Search", ClickCustomButton = "Click custom button", ViewVideo = "View video", ViewGallery = "View gallery", ClickPhone = "Click phone", ClickEmail = "Click email", ClickWebsite = "Click website", ClickFacebook = "Click Facebook", ClickInstagaram = "Click Instagram", ClickLinkedin = "Click Linkedin", ClickTwitter = "Click Twitter", ClickGooglePlus = "Click Google Plus", ClickXing = "Click Xing", ClickYoutube = "Click Youtube", ClickBookmark = "Click bookmark", ClickDirections = "Click Directions", Rendered = "Floor plan rendered", WsExhibitorClick = "ws_exhibitor_click" } export declare function checkUserIsGDPR(): Promise<boolean | null>; export declare function hasUserConsent(consent?: Consent): 'granted' | 'denied' | undefined; export declare function setCookieConsent(cookieConsent: boolean): void; export declare function setConsentSettings(consent?: Consent): void; export declare function sendEventToGa(action: GaEventActions, label: string, eventCategory?: string): void; /** * Structured payloads for GA events that carry more than a single label, * keyed by the GA action. Add an entry here to support a new structured * event — `sendPayloadToGa` then type-checks the payload against the action. */ export interface GaEventPayloads { [GaEventActions.WsExhibitorClick]: { exhibitor_id: number; exhibitor_name: string; exhibitor_external_id: string; creative_slot: 'ws_slider'; }; } export declare function sendPayloadToGa<Action extends keyof GaEventPayloads>(action: Action, payload: GaEventPayloads[Action]): void; export declare function trackWsExhibitorClick(payload: { id: number; name: string; externalId: string; }): void; /** * Wires GA up for the plan being loaded: the event's own GA property and the * `fp_key` every event is tagged with are the live event's, so this runs once * per plan rather than once per page — module scope would leave the second * event reporting into the first one's property (ADR-0011). The event's tag * comes off again with the plan. */ export declare function initGtag(): void; //# sourceMappingURL=gtag.d.ts.map