Created
September 18, 2023 17:34
-
-
Save elephantsneverforget/cc8826f56bf07e1fca34c9c8e069b2a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type IterableEventPayload = { | |
eventName: string; | |
email?: string; | |
campaignId?: string; | |
dataFields: { | |
pageUrl?: string; | |
updatedShoppingCartItems?: Array<IterableItem>; // used for add to cart events | |
items?: Array<IterableItem>; // used for view item and view item list | |
}; | |
}; | |
export type IterableItem = { | |
image_url?: string; // only when available | |
price: number; // 65 | |
list?: string; | |
quantity?: number; // 1 | |
vendor?: string; // "Core" | |
name?: string; // "Crew Ring Set" | |
url?: string; // product url "https://store.myshopify.com/products/crew-ring-set" // only when available | |
product_id?: string; // "6544869851267" | |
variant_id?: string; | |
sku?: string; | |
currency: string; | |
categories?: Array<string>; // ["rings"] | |
}; | |
// These names are arbitrary and can be changed | |
export type IterableEventName = | |
| "Product List View - Elevar SS" | |
| "Product View - Elevar SS" | |
| "Add To Cart - Elevar SS" | |
| "Page View - Elevar SS"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment