Hi!
I am not a developer or programmer but am rather in the marketing realm. I'm working on implementing some tracking for an e-commerce website, and I'd like to add to the script I have so that way the product details (pricing, name, id) get pulled in with the tracking. I know this is a fairly easy thing to accomplish, but I need to guidance! The script as-is is correctly tracking events, so it is just adding in this supplemental information.
I believe I'd need to add something like the below, but can you explain to me what I'd put after the equal sign and why?
Editing to also add another script that I'm trying to do the same thing on:
I know the information is there are well (see screenshot) so I just need it to dynamically fill it based on the product!
Thank you so much for your help! Hopefully, I posted this in the correct forum category.
I am not a developer or programmer but am rather in the marketing realm. I'm working on implementing some tracking for an e-commerce website, and I'd like to add to the script I have so that way the product details (pricing, name, id) get pulled in with the tracking. I know this is a fairly easy thing to accomplish, but I need to guidance! The script as-is is correctly tracking events, so it is just adding in this supplemental information.
Code:
<script type = "text/javascript">
var vendor = window.vendor || [];
vendor.track("Added To Cart", {{Add to Cart}});
</script>
I believe I'd need to add something like the below, but can you explain to me what I'd put after the equal sign and why?
Code:
<script type = "text/javascript">
var vendor = window.vendor || [];
item['productRating']
item['name'] =
item['price'] =
item['quantity'] =
item['cartItemId'] =
item['productId'] =
item['name'] =
item['category'] =
vendor.track("Added To Cart", {{Add to Cart}});
</script>
Editing to also add another script that I'm trying to do the same thing on:
Code:
<script type="text/javascript">
var vendor = window.klaviyo || [];
var orderedItems = window.GEE_cartproducts;
vendor.track("Placed Order", orderedItems);
</script>
I know the information is there are well (see screenshot) so I just need it to dynamically fill it based on the product!
Thank you so much for your help! Hopefully, I posted this in the correct forum category.
Attachments
Last edited: