@expofp/floorplan
Version:
Interactive floor plan library for expos and events
51 lines • 2.1 kB
TypeScript
import { type Consent } from '@expofp/config';
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",
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;
export declare function destroyGtag(): void;
//# sourceMappingURL=gtag.d.ts.map