Skroutz API Access Application no longer accepts requests.

Ecommerce Edit the file on GitHub

Ecommerce tracking allows you to measure the transactions and revenue generated from your e-shop.

You can track two types of ecommerce data:

Order
A completed order - transaction
Item
An item of a completed order - transaction
Table of Contents

Ecommerce

addOrder

The addOrder command creates an Ecommerce order object.

Data Parameters
Name Type Required Description
order_id String Yes The Order ID that was produced by your e-shop. It is used to uniquely identify the transaction.
revenue String Yes The total revenue or grand total of the order. This value must include shipping and tax costs. Any additional payment cost should be excluded.
shipping String Yes The total shipping cost of the order. Any additional payment cost should be excluded.
tax String Yes The total tax of the order.
paid_by String No The payment method type of the order. The recommended payment method types are described in the table below.
paid_by_descr String No The description of payment method of the order that explains the payment method type (free text).
Note

Make sure not to include any cash on delivery (COD) costs in either revenue or shipping.

Type Description (Examples)
bank_transfer Bank transfer
cash_on_delivery Cash on delivery
card Credit/Debit card
paypal PayPal
pay_in_store Pay in Store
cryptocurrency Bitcoin, Etherium, etc.
Note

Analytics can also accept payment method types that are not defined above, but IT IS NOT recommended.

Example
<script>
  skroutz_analytics('ecommerce', 'addOrder', {
    order_id:      '123456',               // Order ID. Required.
    revenue:       '1315.25',              // Grand Total. Includes Tax and Shipping. Does not include payment costs.
    shipping:      '5.45',                 // Total Shipping Cost. Does not include payment costs.
    tax:           '301.25',               // Total Tax.
    paid_by:       'example_paid_by',      // [Optional] Payment method type, e.g. bank_transfer.
    paid_by_descr: 'Example paid_by_descr' // [Optional] Payment method description, e.g. Bank transfer.
  });
</script>

addItem

The addItem command adds a new Ecommerce item object.

Data Parameters
Name Type Required Description
order_id String Yes The Order ID that was produced by your e-shop. This ID links items to their orders.
product_id String Yes The Unique ID from your e-shop.
name String Yes The name of the product from your e-shop.
price String Yes The individual, unit, final price for each item.
quantity String Yes The number of units purchased in the order.
Note
  1. As the Product ID you must provide the same Unique ID that is submitted as part of the XML feedspec.
  2. The name of the product must match the Name that is submitted as part of the XML feedspec.
  3. Make sure your Order ID in your addItem command matches the one submitted by addOrder.
Example
<script>
  skroutz_analytics('ecommerce', 'addItem', {
    order_id:   '123456',                                    // Order ID. Required.
    product_id: '111222',                                    // Product ID. Required.
    name:       'Apple IPhone 6 Plus (16GB) Space Gray EU',  // Product Name. Required.
    price:      '654.90',                                    // Price per Unit. Required.
    quantity:   '2'                                          // Quantity of Items. Required.
  });
</script>