Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Product View
Method Objective
Status | ||||
---|---|---|---|---|
|
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
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); |
Example of use
language | java |
---|---|
theme | FadeToGrey |
Product View
Method Objective
Status | ||||
---|---|---|---|---|
|
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
Params view = new Params();
view
.put(new Params.Item(product_id))
.put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.{type}, type_value));
PersonaClick.track(Params.TrackEvent.VIEW, view); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the current product |
{type} | string | required is some cases | Types of recommendation source. Available values (case sensitive):
|
type_value | string | required is some cases | This parameter can contain one of the values:
|
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
// from a recommender widget
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);
// from the Instant Search
Params view = new Params();
view
.put(new Params.Item("146"))
.put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.INSTANT_SEARCH, "shoes"));
PersonaClick.track(Params.TrackEvent.VIEW, view);
// from the Full Search
Params view = new Params();
view
.put(new Params.Item("1978"))
.put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.FULL_SEARCH, "jacket"));
PersonaClick.track(Params.TrackEvent.VIEW, view); |
Category View
Method Objective
Status | ||||
---|---|---|---|---|
|
Warning |
---|
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. |
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
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. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.CATEGORY, (new Params()).put(Params.Parameter.CATEGORY_ID, "146")); |
Adding a product to the cart
Method Objective
Status | ||||
---|---|---|---|---|
|
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
Params cart = new Params();
cart
.put(new Params.Item(product_id)
.set(Params.Item.COLUMN.AMOUNT, amount)
)
.put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.{type}, type_value));
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 | The total value of the amount of product added to the cart. Default: 1.
| ||
{type} | string | required in some cases | Types of recommendation source. Available values (case sensitive):
| ||
type_value | string | required in some cases | This parameter can contain one of the values:
|
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
// from a recommender widget Params cart = new Params(); cart .put(new Params.Item("100500") .set(Params.Item.COLUMN.AMOUNT, 2) ) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.RECOMMENDATION, "b934b6ba2eb6202b8922d6a3fb8b3271")); PersonaClick.track(Params.TrackEvent.CART, cart); // from the Instant Search Params cart = new Params(); cart .put(new Params.Item("146") .set(Params.Item.COLUMN.AMOUNT, 3) ) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.INSTANT_SEARCH, "shoes")); PersonaClick.track(Params.TrackEvent.CART, cart); // from the Full Search Params cart = new Params(); view cart .put(new Params.Item("1005001978")) .set(Params.Item.COLUMN.AMOUNT, 1) ) .put(new Params.RecommendedBy(Params.RecommendedBy.TYPE.RECOMMENDATIONFULL_SEARCH, "b934b6ba2eb6202b8922d6a3fb8b3271jacket")); PersonaClick.track(Params.TrackEvent.VIEWCART, viewcart); |
Removing a product from the cart
Method Objective
Status | ||||
---|---|---|---|---|
|
product removed from the cart by the user.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.CATEGORY, (new Params()).put(Params.Parameter.CATEGORY_ID, category_id)); |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.CATEGORY, (new Params()).put(Params.Parameter.CATEGORY_ID, "146")); |
Adding a product to the cart
Method Objective
Status | ||||
---|---|---|---|---|
|
REMOVE_FROM_CART, product_id); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product removed from the cart |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_CART, "100500"); |
Update the current cart
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Note |
---|
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. |
Tip |
---|
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
Code Block | ||||
---|---|---|---|---|
| ||||
Params full_cart = new Params(); cart full_cart .put(Params.Parameter.FULL_CART, true) .put(new Params.Item(product_id) .set(Params.Item.COLUMN.FASHION_SIZE, fashion_size) .set(Params.Item.COLUMN.AMOUNT, amount) ) .put(new Params.RecommendedByItem(product_id) .set(Params.RecommendedByItem.TYPECOLUMN.RECOMMENDATIONAMOUNT, recommender_code)amount) ); 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. |
Description | |||
product_id | string | required in some casesThis 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 | The ID of the product added to the cart |
amount | string | optionally | Quantity of product. Default: 1. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
Params full_cart = new Params(); full_cart .put(new Params.Item("100500") .set(Params.Item.COLUMN.FASHION_SIZE, "M") .Parameter.FULL_CART, true) .put(new Params.Item("146") .set(Params.Item.COLUMN.AMOUNT, 2) ) ) .put(new Params.RecommendedByItem("100500") .set(Params.RecommendedByItem.TYPECOLUMN.RECOMMENDATIONAMOUNT, "b934b6ba2eb6202b8922d6a3fb8b3271")3) ); PersonaClick.track(Params.TrackEvent.CART, full_cart); |
Successful checkout
Method Objective
Status | ||||
---|---|---|---|---|
|
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_CART, product_id); |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_CART, "100500"); |
Update the current cart
Method Objective
Note |
---|
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. |
Tip |
---|
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
Code Block | ||||
---|---|---|---|---|
| ||||
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); |
Params purchase = new Params();
purchase
.put(new Params.Item(product_id).set(Params.Item.COLUMN.AMOUNT, amount).set(Params.Item.COLUMN.PRICE, price))
.put(Params.Parameter.ORDER_ID, order_id)
.put(Params.Parameter.ORDER_PRICE, order_price)
.put(Params.Parameter.DELIVERY_ADDRESS, delivery_address)
.put(Params.Parameter.DELIVERY_TYPE, delivery_type)
.put(Params.Parameter.PROMOCODE, promocode)
.put(Params.Parameter.PAYMENT_TYPE, payment_type)
.put(Params.Parameter.TAX_FREE, tax_free);
PersonaClick.track(Params.TrackEvent.PURCHASE, purchase); |
Request parameters
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
product_id | string | required | Product ID | ||
amount | number | required | Product quantity | ||
price | number | optionally | Product price | ||
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. | ||
delivery_address | string | optionally | Delivery address. Any text. | ||
delivery_type | string | optionally | Delivery Type, e.g. "courier", "self_pickup", "delivery", "pickup_point", etc. | ||
promocode | string | optionally | Promo code that was used.
| ||
payment_type | string | optionally | Payment method. Any string value. For example: "cash", "card", "wire". | ||
tax_free | boolean | optionally | It sets whether the order was placed with Tax-Free or not. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
full_cartParams purchase = new Params(); purchase .put(new Params.Item("37").set(Params.Item.ParameterCOLUMN.FULL_CARTAMOUNT, true) 3).set(Params.Item.COLUMN.PRICE, 140.55)) .put(new Params.Item("146187") .set(Params.Item.COLUMN.AMOUNT, 2) 1).set(Params.Item.COLUMN.FASHION_SIZE.PRICE, 328.35)) .put(Params.Parameter.ORDER_ID, "XLN100500") ) .put(Params.Parameter.ORDER_PRICE, 750) .put(new Params.Item("100500Parameter.PROMOCODE, "BIRTHDAY") .set .put(Params.Item.COLUMN.AMOUNTParameter.DELIVERY_TYPE, 3"delivery") .set .put(Params.Item.COLUMNParameter.FASHIONPAYMENT_SIZETYPE, "XScart") ); PersonaClick.track(Params.TrackEvent.CARTPURCHASE, full_cartpurchase); |
Search Request
Method Objective
Status | ||||
---|---|---|---|---|
|
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
Params purchase = new Params(); purchase .put(new Params.Item(product_id).set(Params.Item.COLUMN.AMOUNT, amount)) .put(Params.Parameter.ORDER_ID, order_id) PersonaClick.track(Params.TrackEvent.SEARCH, new Params().put(Params.Parameter.ORDERSEARCH_PRICEQUERY, ordersearch_price); PersonaClick.track(Params.TrackEvent.PURCHASE, purchasequery)); |
Request parameters
Name | Type | Requirement | Description | |
---|---|---|---|---|
search_ | idquery | string | required | Product IDSearch query phrase. |
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. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.SEARCH, new Params().put(Params.Parameter.SEARCH_QUERY, "to be or not to be")); |
Adding a product to the wishlist
Method Objective
The method gives the system an understanding the user has added a product to the wishlist.
Syntax and parameters
Code Block | ||||||
---|---|---|---|---|---|---|
| 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.WISH, product_id); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product added to the wishlist |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.PURCHASEWISH, purchase"100500"); |
Removing a product from the wishlist
Method Objective
The method gives the system an understanding of the user 's search querieshas removed a product from the wishlist.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.SEARCH, new Params().put(Params.Parameter.SEARCH_QUERY, search_query)); |
Request parameters
REMOVE_FROM_WISH, product_id); |
Name | Type | Requirement | Description |
---|---|---|---|
product_id | string | required | The ID of the product removed from the wishlist |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_WISH, "100500"); |
Update the current wishlist
Method Objective
The method updates the whole wishlist on the system side.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.SEARCH,Params full_wish = new Params(); full_wish .put(Params.Parameter.SEARCHFULL_QUERYWISH, "to be or not to be")); |
Adding a product to the wishlist
Method Objective
The method gives the system an understanding the user has added a product to the wishlist.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
true) .put(new Params.Item(product_id)) .put(new Params.Item(product_id)); PersonaClick.track(Params.TrackEvent.WISH, productfull_idwish); |
Name | Type | Requirement | Description |
---|
Example of use
language | java |
---|---|
theme | FadeToGrey |
Removing a product from the wishlist
Method Objective
The method gives the system an understanding the user has removed a product from the wishlist.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track(Params.TrackEvent.REMOVE_FROM_WISH, product_id); |
Example of use
language | java |
---|---|
theme | FadeToGrey |
product_id | string | required | The ID of the product added to the wish |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
Params full_wish = new Params(); full_wish .put(Params.Parameter.FULL_WISH, true) .put(new Params.Item("146")) .put(new Params.Item("100500")); PersonaClick.track(Params.TrackEvent.REMOVE_FROM_WISH, "100500"full_wish); |
Custom event
Method Objective
The method gives the system an understanding that some user event has happened.
Note |
---|
Before you can use custom events, you must create them in the PersonaClick account: Settings > Custom events. |
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
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. |
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track("my_event"); |
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.track("my_event", "my_category", "my_label", 100500); |
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|