Product visit event notification

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.

  

This article is part of the guide to creating a custom integration.
If your integration is via a module, this tag will be added to your ecommerce platform automatically.

 

How to use it

The product visit report uses the entityInfo, option in the sendEvents method to enrich the information about the events sent.

  

This event represents an alternative when implementing the Contact has visited a product" tag in the HTML of your store or web page.

 

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 });
  

In the example, the page visit event is also reported, to communicate both events with a single call to Connectif tracking.

 

 

Congratulations!
You’ve reached the end of the tutorial.

  

Do you have questions?
Don’t forget, our Connectif specialists are here to help you. To contact them, just open a Support ticket by clicking the blue “Help” button on your dashboard.


Keep learning!

To make the most of your Connectif account, we recommend reading these articles next:

Was this article helpful?
0 out of 0 found this helpful