The “Purchase Made” tag is an HTML code snippet used to describe a completed purchase.
What is this tag and where to use it?
The “cn_purchase" tag must be inserted on the first page visited after a purchase. Usually, this will be the purchase confirmation page.
Properties
The different properties of a purchase must be defined within the “cn_purchase" tag as child tags, indicating the property name in the “class" attribute.
Each different product in the cart is indicated with a tag with the class "product_basket_item", which includes the quantity and the amount.
The properties to include in the tag are:
| Name | Required | Type | Multiple | Description |
|---|---|---|---|---|
| total_quantity | Yes | integer | No | Total number of products in the purchase (including duplicates). For example: if a cart contains 3 units of one product and 7 units of another, total_quantity will be 10. |
| total_price | Yes | decimal | No | Total amount of the purchase. |
| payment_method | No | string | No | Payment method used for the purchase. |
| purchase_date | No | string | No | Date and time of the purchase. Expected format: ISO_8601, e.g., 2024-09-13T10:49:31Z. |
| product_basket_item | No | Product Basket Item | Yes | Items included in the purchase, along with their quantity and amount. |
| source_name | No | string | No | The name of the source, to provide context or detail about the type of purchase source. |
| source_type | No | string | No | The name of the source where the purchase was made. Possible values are: "marketplace", "digital-store", "point-of-sale", "third-party" and "other". |
| purchase_id | Yes | string | No | Unique identifier of the purchase. |
| cart_id | No | string | No | Unique identifier of the cart from which this purchase originated. |
Organization of Source Values (source_type)
Below are explained each of the possible values of the purchase source (source_type):
| Value | Description | Example |
|---|---|---|
| third-party | Sales routed through distributors, retailers, or partner networks (not marketplaces). | Wholesale, Distributors, Affiliates... |
| other | Edge cases or special channels that don’t fit into the categories above. | Telesales, Trade shows & events, Social commerce... |
| marketplace | Third‑party eCommerce platforms where you list your products. | Amazon Marketplace, eBay, Zalando... |
| digital-store | Sales from the retailer’s own eCommerce website or app. | Direct, Organic Search, Paid Search, Email Marketing... |
| point-of-sale | Sales in physical stores processed through a POS system. | In‑store checkout, In‑store kiosk, Pop‑up stores... |
Example
Once the properties are included, the tag will look like this:
<div class="cn_purchase " style="display:none">
<span class="cart_id">crt8679803</span>
<span class="purchase_id">prchs5241</span>
<span class="purchase_date">2017-09-29 14:12:37.430Z</span>
<span class="total_quantity">3</span>
<span class="total_price">180.75</span>
<span class="payment_method">Credit card</span>
<span class="source_type">digital-store</span>
<span class="source_name">My online store</span>
<div class="product_basket_item">
<span class="quantity">3</span>
<span class="price">180.75</span>
<span class="url">http://example.org/products/pr9658</span>
<span class="product_id">pr9658</span>
<span class="name">Logitech Gaming Keyboard Pro v.1.5</span>
<span class="description">High-end wireless backlit keyboard, customizable and resistant to liquids and drops.</span>
<span class="image_url">http://example.org/img/products/pr9658.jpg</span>
<span class="unit_price">60.25</span>
<span class="availability">InStock</span>
<span class="category">/Computers/Keyboards/Logitech</span>
<span class="category">/Computers/Gaming</span>
<span class="tag">Blue</span>
<span class="tag">Gaming</span>
<span class="tag">Backlit</span>
<span class="tag">Wireless</span>
<span class="brand">Logitech</span>
<span class="review_count">9</span>
<span class="rating_value">4.5</span>
<span class="thumbnail_url">http://example.org/img/thumbnails/products/pr9658.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="published_at">2020-05-20T15:24:20Z</span>
<span class="custom_field_1">Example custom information</span>
</div>
</div>
Keep learning!
To make the most of your Connectif account, we recommend continuing with the following articles:
Integration using tags, to learn about all the notifications you can send from your eCommerce to Connectif and how they work.
Integration using JavaScript events, to learn about this type of integration that gives you greater control over when and how to send events.
Integration with Connectif via API, to sync contacts, products, purchases, and coupons.
Check integration with your eCommerce, to ensure all data is correctly syncing in your Connectif account.