Setting Monitoring for Products and Carts

Personyze allows you to log Interaction Events from your JavaScript.

In the code below, substitute PRODUCT_ID with value that appears in your Product Catalog in the “Internal ID” column, which is the Product ID used by Personyze (If you have a product, let’s say a hat, with different colors, the ID should be the group ID of all such hats). 

You can check your product catalog here: settings%2F Recommendations%2FProducts%20catalog

// 1. Product Viewed Event – Send it from every view of a product page.
(self.personyze=self.personyze||[]).push([“Product Viewed”, PRODUCT_ID]);

// 2. Added to Favorites (wishlist) Event – Send it when a visitor saves a product to wishlist or like list.
(self.personyze=self.personyze||[]).push([“Product Liked”, PRODUCT_ID]);

// 3. Removed from Favorites Event – send it when a visitor removed a product from their wish/like list.
(self.personyze=self.personyze||[]).push([“Product Unliked”, PRODUCT_ID]);

// 4. Added to cart event – send it when a visitor adds a product to their cart.
(self.personyze=self.personyze||[]).push([“Product Added to cart”, PRODUCT_ID]);
// …or with quantity (number of items)
(self.personyze=self.personyze||[]).push([“Product Added to cart”, PRODUCT_ID, ‘Quantity’, QUANTITY]);

// 5. Buy Event for Particular Products – send it when a visitor purchased a product, you need to send events for each product, or use the “Buy All Event” to set all products in the visitor’s cart as purchased.

// Note: the transaction sum will be calculated according to prices that appear in the product catalog.
(self.personyze=self.personyze||[]).push([“Product Purchased”, PRODUCT_ID]);
// … with quantity (number of items)
(self.personyze=self.personyze||[]).push([“Product Purchased”, PRODUCT_ID, ‘Quantity’, QUANTITY]);

// 5a. “Buy All” Event – Convert all the products that have been Added to cart to “Purchased”.
(self.personyze=self.personyze||[]).push([“Products Purchased”]);

// 6. Remove Particular Products from Cart Event
(self.personyze=self.personyze||[]).push([“Product Removed from cart”, PRODUCT_ID]);
// … remove all from cart. Convert all the products that have been Added to cart to “Viewed”:
(self.personyze=self.personyze||[]).push([“Products Removed from cart”]);

Personzye calculates the sum based on the prices as they appear in the product feed; you can also send the total transaction after tax, shipping, coupons etc., thus will appear under the conversion goal value in Personzye UI.


(self.personyze=self.personyze||[]).push([“Event”, “Purchase”, “1”]);