Transport and access
Communication runs over HTTPS and every client has its own API key.
This page summarises what deploying Customize.cz means technically. The detailed feed specification is in the PDF documentation below. For the general process see How it works; for box setup see the recommendation boxes overview.
The tracker.js script loads asynchronously and receives its commands through the _cmq queue. To display a box you pass the site identifier, the box ID, the ID of the element the box is rendered into and the page context (product ID, category or basket contents). After an order is completed, the conversion action is sent from the confirmation page.
Place an empty element where the box should appear and the commands below it. Load the tracker as close to the footer as possible, before </body>.
<div id="customize_box_detail"></div>
<script>
var _cmq = _cmq || [];
_cmq.push(['action', 'show']);
_cmq.push(['box', 'BOX_ID']);
_cmq.push(['web', 'YOUR_WEB']);
_cmq.push(['elementid', 'customize_box_detail']);
_cmq.push(['userid', '']);
_cmq.push(['itemid', 'PRODUCT_ID']);
_cmq.push(['exceptid', '']);
_cmq.push(['process']);
</script>
<!-- Customize.cz tracking script -->
<script>
var cm = document.createElement('script');
cm.type = 'text/javascript';
cm.async = true;
cm.src = '//customize.cz/add/tracker.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(cm, s);
</script>On the confirmation page, send the order number and, for each product, its ID, unit price including VAT and quantity. Repeat the itemid, price and quantity lines for every product in the order.
<script>
var _cmq = _cmq || [];
_cmq.push(['action', 'conversion']);
_cmq.push(['web', 'YOUR_WEB']);
_cmq.push(['transaction', 'ORDER_NUMBER']);
_cmq.push(['userid', 'CUSTOMER_ID']);
_cmq.push(['firstname', 'FIRST_NAME']);
// for each product in the order:
_cmq.push(['itemid', 'PRODUCT_ID']);
_cmq.push(['price', 'UNIT_PRICE_WITH_VAT']);
_cmq.push(['quantity', 'QUANTITY']);
_cmq.push(['process']);
</script>
<!-- followed by the same tracker.js loader as above -->The product XML feed follows the Heureka structure: a SHOP root with SHOPITEM entries. It is imported regularly and the boxes select products from it.
| Field | Meaning |
|---|---|
ITEM_ID, PRODUCT, URL, IMGURL | Basic product data: ID, name, product and image URL. |
PRICE_VAT | Price including VAT. |
CAT1 to CAT4, PARAM | Categories and product parameters. |
PROFITABILITY, ACTION, BUYURL, DELIVERY_DATE | Optional fields: profitability, promotion, add-to-basket URL and delivery time. |
FIELD1 to FIELD15 | Optional custom fields; fields 13 to 15 carry a discount code. |
An optional feed that keeps prices and availability current so that sold-out items do not end up in the boxes. It contains ITEM_ID, PRODUCT, PRICE_VAT, PRICE_VAT_NORMAL and DELIVERY_DATE.
An optional feed with order history that powers personalization based on past purchases and personalized e‑mail. The ORDERS root contains ORDER entries with ORDER_ID, ORDER_CREATED, PRODUCT_ID, PRODUCT_QUANTITY, PRODUCT_PRICE, USER_ID and USER_NAME. USER_ID is a hash of the customer's e‑mail.
Use the Box API when you render recommendations yourself. It returns the list of boxes and the settings and products of a given box. API_KEY is your e‑shop's key.
GET /data/v1.2/API_KEY/box/list
GET /data/v1.2/API_KEY/box/get?box=BOX_NAMEThe Logger API accepts impression, click, add-to-basket and completed-order events from your own rendering. Both POST and GET are supported.
POST /data/v1.2/API_KEY/logger/show
POST /data/v1.2/API_KEY/logger/click
POST /data/v1.2/API_KEY/logger/buy
POST /data/v1.2/API_KEY/logger/conversion| Parameter | Meaning |
|---|---|
entity | Page type: homepage, catalog, detail, basket, article or other. |
entity_id | ID of the product whose page the event happened on (the order number for conversion). |
place, place_id | Box position and a unique ID of the particular impression that later events refer to. |
recommended_id[] | IDs of the recommended products (a single ID for click and buy). |
url, session_id | Page URL and the visitor's session ID, which links events to an order. |
total_price | conversion only: total order price. |
A successful call returns:
{"status": "ok"}When a customer asks for erasure, call customerDelete. The call is protected by Basic authentication with your e‑shop's API credentials. The customer identifier is irreversibly anonymized. More about data processing in the Privacy policy.
POST /data/v1.2/API_KEY/customerDelete
Authorization: Basic USER:PASSWORD
customerId=CUSTOMER_IDDownload the feed documentation or get in touch and we will arrange a technical consultation.