Skip to content

Instantly share code, notes, and snippets.

@elephantsneverforget
Created September 20, 2023 20:56
Show Gist options
  • Save elephantsneverforget/0c2f38489962eec2dfff1d8b08a67990 to your computer and use it in GitHub Desktop.
Save elephantsneverforget/0c2f38489962eec2dfff1d8b08a67990 to your computer and use it in GitHub Desktop.
export type PubSubEventPayload = {
cookies: Partial<Record<ValidCookieKeys, string>>; // cookie values present on event
landingSite: Partial<Record<TrackedQueryParams, string>>; // first click params
visitorInfo: Omit<VisitorInfo, (typeof TRACKED_MISC)["GTM_CONSENT"]>; // only on purchase events Elevar notes data
customerInfo: CustomerInfo & { _enriched: Array<keyof CustomerInfo> }; // enriched data
domain: string; // site domain
event: StandardEvent;
userConsent: VisitorInfo[(typeof TRACKED_MISC)["GTM_CONSENT"]]; // consent status
// sources: Array<"DL" | "Webhook" | "Webpixel">; // sources of the event
// cartContents: Array<CartContent>; // cart contents at time of event
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment