The method gives the system an understanding of the product viewed by the user.
Params view = new Params(); view .put(new Params.Item(product_id)) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.RECOMMENDATION, recommeder_code)); PersonaClick.track(Params.TrackEvent.VIEW, view); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the current product |
recommender_code | string | required is some cases | This property should have a unique code for the product recommendations block if the current product was opened from the recommendation block. The unique code is available in the PersonaClick account in the "data-recommender-code" attribute of each block. |
Params view = new Params(); view .put(new Params.Item("100500")) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.RECOMMENDATION, "b934b6ba2eb6202b8922d6a3fb8b3271")); PersonaClick.track(Params.TrackEvent.VIEW, view); |
The method gives the system an understanding of the category viewed by the user.
The API will respond with an error for categories unknown to the system. The system only knows the categories from the product feed (XML) or the HTTP import of the category list. |
PersonaClick.track(Params.TrackEvent.CATEGORY, (new Params()).put(Params.Parameter.CATEGORY_ID, category_id)); |
Name | Type | Requirement | Description |
---|---|---|---|
category_id | string | required | The ID of the current category. |
PersonaClick.track(Params.TrackEvent.CATEGORY, (new Params()).put(Params.Parameter.CATEGORY_ID, "146")); |
The method gives the system an understanding of the product added to the cart by the user.
Params cart = new Params(); cart .put(new Params.Item(product_id) .set(Params.Item.COLUMN.FASHION_SIZE, fashion_size) .set(Params.Item.COLUMN.AMOUNT, amount) ) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.RECOMMENDATION, recommender_code)); PersonaClick.track(Params.TrackEvent.CART, cart); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product added to the cart |
amount | string | optionally | Quantity of product. Default: 1. |
fashion_size | string | optionally | The parameter allows specifying the size of the product related to the Apparel & Accessories niche. |
recommender_code | string | required in some cases | This property should have a unique code for the product recommendations block if the current product was added to the cart from the recommendation block. The unique code is available in the PersonaClick account in the "data-recommender-code" attribute of each block. |
Params cart = new Params(); cart .put(new Params.Item("100500") .set(Params.Item.COLUMN.FASHION_SIZE, "M") .set(Params.Item.COLUMN.AMOUNT, 2) ) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.RECOMMENDATION, "b934b6ba2eb6202b8922d6a3fb8b3271")); PersonaClick.track(Params.TrackEvent.CART, cart); |
The method gives the system an understanding of the product removed from the cart by the user.
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_CART, product_id); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product removed from the cart |
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_CART, "100500"); |
The method updates the whole cart on the system side.
This method is required for use on the cart page when the user does certain actions there: when the user visits the page, changes the quantity of a product in the cart, removes a product from the cart, or clears the cart completely. |
This method can be used on the product page as an alternative to the "Add to cart" and "Remove from cart" methods if you have access to the entire cart on the product page. |
Syntax and parameters
full_cart .put(Params.Parameter.FULL_CART, true) .put(new Params.Item(product_id) .set(Params.Item.COLUMN.AMOUNT, amount) .set(Params.Item.COLUMN.FASHION_SIZE, fashion_size) ) .put(new Params.Item(product_id) .set(Params.Item.COLUMN.AMOUNT, amount) .set(Params.Item.COLUMN.FASHION_SIZE, fashion_size) ); PersonaClick.track(Params.TrackEvent.CART, full_cart); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product added to the cart |
amount | string | optionally | Quantity of product. Default: 1. |
fashion_size | string | optionally | The parameter allows specifying the size of the product related to the Apparel & Accessories niche. |
full_cart .put(Params.Parameter.FULL_CART, true) .put(new Params.Item("146") .set(Params.Item.COLUMN.AMOUNT, 2) .set(Params.Item.COLUMN.FASHION_SIZE, "XL") ) .put(new Params.Item("100500") .set(Params.Item.COLUMN.AMOUNT, 3) .set(Params.Item.COLUMN.FASHION_SIZE, "XS") ); PersonaClick.track(Params.TrackEvent.CART, full_cart); |
The method gives the system information about the successful checkout, its products, and other information related to the checkout.
Params purchase = new Params(); purchase .put(new Params.Item(product_id).set(Params.Item.COLUMN.AMOUNT, amount)) .put(Params.Parameter.ORDER_ID, order_id) .put(Params.Parameter.ORDER_PRICE, order_price); PersonaClick.track(Params.TrackEvent.PURCHASE, purchase); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | Product ID. |
amount | number | required | Product Quantity. |
order_id | string | optionally | Internal store Order ID. If not specified, the system will create its internal ID. Synchronization of order statuses, in this case, won't be available. |
order_price | number | optionally | The final order value, including all discounts. If not specified, the system will calculate the order value based on prices from the product feed. |
Params purchase = new Params(); purchase .put(new Params.Item("37").set(Params.Item.COLUMN.AMOUNT, 3)) .put(new Params.Item("187").set(Params.Item.COLUMN.AMOUNT, 1)) .put(Params.Parameter.ORDER_ID, "N100500") .put(Params.Parameter.ORDER_PRICE, 750); PersonaClick.track(Params.TrackEvent.PURCHASE, purchase); |
The method gives the system an understanding of the user's search queries.
PersonaClick.track(Params.TrackEvent.SEARCH, new Params().put(Params.Parameter.SEARCH_QUERY, search_query)); |
Name | Type | Requirement | Description |
---|---|---|---|
search_query | string | required | Search query phrase. |
PersonaClick.track(Params.TrackEvent.SEARCH, new Params().put(Params.Parameter.SEARCH_QUERY, "to be or not to be")); |
The method gives the system an understanding the user has added a product to the wishlist.
PersonaClick.track(Params.TrackEvent.WISH, product_id); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product added to the wishlist |
PersonaClick.track(Params.TrackEvent.WISH, "100500"); |
The method gives the system an understanding the user has removed a product from the wishlist.
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_WISH, product_id); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product removed from the wishlist |
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_WISH, "100500"); |
The method gives the system an understanding that some user event has happened.
Before you can use custom events, you must create them in the PersonaClick account: Settings > Custom events. |
PersonaClick.track(custom_event_key, category, label, value); |
Name | Type | Requirement | Description |
---|---|---|---|
custom_event_key | string | required | Unique custom event key. Must be pre-created in the PersonaClick account: Settings > Custom events. |
category | string | optionally | A category is a name that you supply as a way to group some event's properties. |
label | string | optionally | With labels, you can provide additional information for events that you need. |
value | number | optionally | The value property can be any integer and can be used to send a specific value in an event. |
PersonaClick.track("my_event"); |
PersonaClick.track("my_event", "my_category", "my_label", 100500); |
Page Navigation Related Pages |