The "Product visit event notification" is used to communicate that the contact has visited a specific product while browsing the website. It notifies you, via JavaScript, when a user accesses a product detail page by using the function connectif.managed.sendEvents.
How to use it
The product visit report uses the entityInfo, option in the sendEvents method to enrich the information about the events sent.
Report the visited product information
This object represents a product from an online store. It includes the following properties:
First name | Required | Type | Description |
---|---|---|---|
productDetailUrl | Yes | string | URL of the product page (the URL must be unencoded). |
productId | Yes | string | Unique product identifier (in eCommerce). |
name | Yes | string | Product name. |
description | No | string | Product description. May contain HTML code. |
imageUrl | No | string | URL of the product image. |
unitPrice | Yes | number | Product unit price. |
availability | No | string | It can have one of the following values: InStock or OutOfStock. |
categories | No | array | The category to which the product belongs. If the ecommerce site allows sub-categories, you can indicate them with the full path of the category separating each level with the character '/'. For example: "/Computers/Keyboards/Logitech". |
tags | No | array | The labels associated with the product. |
brand | No | string | Product brand. |
reviewCount | No | number | Number of reviews of the product. |
rating | No | number | Product rating normalized to a range of 0 to 5. |
ratingCount | No | number | Number of product ratings. |
thumbnailUrl | No | string | URL of the product thumbnail image. |
relatedExternalProductIds | No | array | IDs of related products. |
priority | No | number | Priority of a product. |
unitPriceOriginal | No | number | Unit price of the product without applying the discount. |
unitPriceWithoutVAT | No | number | Original unit price of the product. |
discountedAmount | No | number | Discounted price of the product. |
discountedPercentage | No | number | Percentage discount, range 0 to 100 without percentage symbol. |
publishedAt | No | string | Date of publication of the product in the store catalog in ISO 8601 format. For example: "2020-05-20T15:12:20Z". |
customField1 | No | string | Customized product field. |
customField2 | No | string | Customized product field. |
customField3 | No | string | Customized product field. |
Example
The notification will look like this:
connectif.managed.sendEvents([ { "type": "product-visited", "product": { "name": "My product", "productDetailUrl": "https://myshop.com/product/details/59a31949a1a562d4979fbca2", "productId": "59a31949a1a562d4979fbca2", "unitPrice": 51.88, "availability": "outofstock", "imageUrl": "https://myshop.com/img/59a31949a1a562d4979fbca2.jpg", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollic.", "priority": 10, "rating": 4, "tags": ["tag1", "tag2", "tag3"],
"categories": "["a/b/c", "d/b"], "relatedExternalProductIds": ["59a31953a1a562d4979fbd90", "59a31b2ba1a562d4979fe5b8"], "unitPriceOriginal": 51.88, "unitPriceWithoutVAT": 41.5, "discountedAmount": 5.19, "discountedPercentage": 10, "ratingCount": 16, "brand": "Jata", "publishedAt": "2020-05-03T10:15:00Z", "customField1": "Lorem ipsum dolor sit amet 1", "customField2": "Lorem ipsum dolor sit amet 2", "customField3": "Lorem ipsum dolor sit amet 3" } }, { "type": "page-visit" } ], { entityInfo, cart });
Keep learning!
To make the most of your Connectif account, we recommend reading these articles next:
- Add Connectif JavaScript to your website, to insert the code and start collecting information about the visits to your site.
- Tag integration, to discover all the notifications you can send from your ecommerce to Connectif and how they work.
- Integration with Connectif via API, to synchronize contacts, products, purchases and vouchers.
- Check the integration with your ecommerce, so you can be confident that your data is syncing correctly with your Connectif account.