“Contact has visited a product” tag


Cet article est actuellement disponible en anglais et en espagnol. Vous pouvez vous servir de cette documentation en attendant qu'elle soit disponible dans votre langue.

The “Contact has visited a product” tag is a snippet of HTML code that notifies you when a contact visits a specific product while browsing the website.  


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.


What is this tag and where is it used?

The “cn_product_visited” tag should be inserted on all product detail pages.



You’ll need to define the different properties of the “Contact has visited a product” tag within the "cn_product_visited" tag as child tags, indicating the name of the property in the "class" attribute. 

The properties to be included in the tag are:

First name Required Type Multiple Description
url Yes string No URL of the product page (the URL must be unencrypted).
product_id Yes string No Unique identifier of the product (in ecommerce).
name Yes string No Product name.
unit_price decimal No Unit price of the product.
description No string No Description of the product.
image_url No string No URL of the product image.
availability No string No It can have one of the following values: InStock or OutOfStock.
category No string Yes The category to which the product belongs. If your ecommerce site allows sub-categories, you can indicate them with the full route of the category, separating each level with the character '/'.
For example: “/Computers/Keyboards/Logitech".
tag No string Yes The tags associated with the product.
brand No string No Product brand.
review_count No integer No The number of reviews of the product.
rating_value No decimal No Standard product rating in the range of 0 to 5.
rating_count No integer No Number of product ratings.
thumbnail_url No string No URL of the product thumbnail image.
related_external_product_id No string Yes Related product IDs.
priority No integer No Product priority.
unit_price_original No decimal No Original unit price of the product.
unit_price_without_vat No decimal No Product unit price without taxes.
discounted_percentage No decimal No Discount percentage, range from 0 to 100 without percentage symbol.
discounted_amount No decimal No Reduced price of the product (must correspond to unit_price_original - unit_price).
published_at No datetime No Date of publication of the product in the store catalog in ISO 8601 format.
For example: "2020-05-20T15:12:20Z".
custom_field_1 No string No Custom product field.
custom_field_2 No string No Custom product field.
custom_field_3 No string No Custom product field.


Other considerations

Since they share properties, we recommended having this event triggered alongside the “Contact has visited a product” tag when visiting a product from a search, as shown below:

<div class="cn_product_visited cn_product_searched" style="display:none">
... properties here ...



Once the properties are included, the tag will look like this:

<div class="cn_product_visited" style="display:none">
<span class="url">http://example.org/products/pr10633</span>
<span class="product_id">pr10633</span>
<span class="name">Microsoft Office 365 Personal 1 Licencia 1 Año</span>
<span class="description">El Office que podrás usar en casa y mientras te mueves.</span>
<span class="image_url">http://example.org/img/products/pr10658.jpg</span>
<span class="unit_price">45.50</span>
<span class="availability">InStock</span>
<span class="category">/Ordenadores/Programas</span>
<span class="tag">Microsoft</span> <span class="tag">Personal</span>
<span class="tag">Software</span> <span class="brand">Microsoft Office</span>
<span class="review_count">7</span> <span class="rating_value">3.9</span>
<span class="thumbnail_url">http://example.org/img/thumbnails/products/pr10658.jpg</span>
<span class="related_external_product_id">pr10636</span>
<span class="related_external_product_id">pr11939</span>
<span class="related_external_product_id">pr12653</span>
<span class="priority">6</span>
<span class="published_at">2020-05-20T15:24:20Z</span>
<span class="custom_field_1">Información personalizada de ejemplo</span>



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:

Cet article vous a-t-il été utile ?
Utilisateurs qui ont trouvé cela utile : 0 sur 0