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.
What is this tag and where is it used?
The “cn_product_visited” tag should be inserted on all product detail pages.
Properties
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 | Sí | 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 searched for 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 ...
</div>
Example
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>
</div>
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.