Ecommerce Tracking

In order to send transactional data into Kardio, you will need to fire events programatically. We can't automatically detect transactions with our base script.

View Product

You can send a "view_product" event every time a user visits one of your product pages.

An example would look like this:

<script>
  window.kardio_data.push({
  event: "view_product",
  items: [
    {
      id: "SKU123",           // Product ID
      name: "Product Name",   // Product name
      brand: "Brand Name",    // Brand name
      category: "Category",   // Primary category
      variant: "Blue",        // Variant (e.g., color, size)
      price: 49.99,           // Unit price
      quantity: 1             // Quantity viewed
    }
  ],
  currency: "GBP"             // Currency code
});
</script>

Add to Cart

You can send an "add_to_cart" event to track how often a product is added to users' baskets.

An example would look like this:

<script>
  window.kardio_data.push({
  event: "add_to_cart",
  items: [
    {
      id: "SKU123",           // Product ID
      name: "Product Name",   // Product name
      brand: "Brand Name",    // Brand name
      category: "Category",   // Primary category
      variant: "Blue",        // Variant (e.g., color, size)
      price: 49.99,           // Unit price
      quantity: 2             // Quantity added to cart
    }
  ],
  currency: "GBP"             // Currency code
});
</script>

View Cart

You can track how many times a product is viewed in a user's cart.

Here's an example of this:

<script>
  window.kardio_data.push({
  event: "view_cart",
  items: [
    {
      id: "SKU123",           // Product ID
      name: "Product Name",   // Product name
      brand: "Brand Name",    // Brand name
      category: "Category",   // Primary category
      variant: "Blue",        // Variant (e.g., color, size)
      price: 49.99,           // Unit price
      quantity: 2             // Quantity in cart
    }
  ],
  currency: "GBP"             // Currency code
});
</script>

Enter Checkout

You can track which items are in a user's cart as they enter the checkout.

You can see an example of this below:

<script>
  window.kardio_data.push({
  event: "enter_checkout",
  items: [
    {
      id: "SKU123",        // Product ID
      name: "Product Name",   // Product name
      brand: "Brand Name",    // Brand name
      category: "Category",   // Primary category
      variant: "Blue",        // Variant (e.g., color, size)
      price: 49.99,           // Unit price
      quantity: 2             // Quantity in checkout
    }
  ],
  currency: "GBP"             // Currency code
});
</script>

Transactions

You can capture transactional data from your site to send into Kardio.

A key ecommerce metric, you can track which products are being purchased and how much revenue is being generated.

See an example of a transaction below:

<script>
  window.kardio_data.push({
  event: "transaction",
  transaction: {
    hb_tid: "T123456",        // Transaction ID
    hb_revenue: 99.99,        // Total revenue
    hb_tax: 10.00,            // Tax amount
    hb_shipping: 5.00,        // Shipping cost
    hb_coupon: "SUMMER10"     // Coupon code (if applicable)
  },
  items: [
    {
      id: "SKU123",        // Product ID
      name: "Product Name",   // Product name
      brand: "Brand Name",    // Brand name
      category: "Category",   // Primary category
      variant: "Blue",        // Variant (e.g., color, size)
      price: 49.99,           // Unit price
      quantity: 2             // Quantity purchased
    }
  ],
  currency: "GBP"             // Currency code
});
</script>