Last active
January 18, 2022 17:35
-
-
Save kmclaugh/c94b87357607826ceba9a447506cec61 to your computer and use it in GitHub Desktop.
How to update the products array.
This file contains 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
/* | |
* description: You need to update the products array to change the id field | |
* from the product id to the product sku so it matches the checkout experience. | |
* See the example product detail event below. | |
*/ | |
{ | |
event: "view_item_ua", | |
ecommerce: { | |
detail: { | |
products: [ | |
{ | |
price: "70.0", | |
quantity: 1, | |
name: "Black Clay - Large Serving Bowl", | |
id: "DEC-KIT-BWL-SER-MEX-LRG-BLK-001", // <- Needs to be the sku not product id (1298962841707) | |
brand: "Mexico", | |
category: "Tabletop", | |
variant: "Default" | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment