Transaction Event



This tagging documentation only applies to Tracker from version 5.20.0.

Before beginning implementation of Sales Insights, please make sure you have read the events’ getting started.
If you can’t see the “Sales Insights” menu entry in Explorer, please get in touch with us so we get this activated for you.


Transaction Events

The plugin provides a function useful for measuring the confirmation of a transaction.


Transaction confirmation

The Tracker has several declaration methods:

  • tag.ecommerce.transactionConfirmation.cart.set()
  • tag.ecommerce.transactionConfirmation.transaction.set()
  • tag.ecommerce.transactionConfirmation.shipping.set()
  • tag.ecommerce.transactionConfirmation.payment.set()
  • tag.ecommerce.transactionConfirmation.products.set()

Measuring transaction confirmation is done via declaring a cart object, a transaction object, a delivery object, a payment object and a product table.

The cart is declared as an object that can have the following properties:

  • “id” – String: Cart ID.
  • “currency” – String: Currency.
  • “turnovertaxincluded” – Float: Total cart amount, tax incl. (shipping incl.).
  • “turnovertaxfree” – Float: Total cart amount, tax excl. (shipping incl.).
  • “creation_utc” – Date: Date of shopping cart creation (UTC timestamp in seconds).
  • “quantity” – Number: Number of products in cart.
  • “nbdistinctproduct” – Number: Number of distinct products in cart.

The transaction is declared as an object that can have the following properties:

  • “id” – String: Transaction ID (this parameter is mandatory).
  • “status” – String: Transaction status.
  • “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
  • “firstpurchase” – Boolean: First customer purchase.

Shipping information is declared as an object that can have the following properties:

  • “delivery“ – String: Name of delivery provider.
  • “costtaxincluded” – Float: Shipping fees, tax incl.
  • “costtaxfree” – Float: Shipping fees, tax excl.

The payment method is declared as an object with the following property:

  • “mode” – String: Payment method.

The product table can include one or several products.

A product is declared as an object that can have the following properties:

  • “id” – String: Product ID (this parameter is mandatory).
  • “variant” – String: Product variant (size, color, etc.).
  • “$” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product.
  • “pricetaxincluded” – Float: Product price, tax incl.
  • “pricetaxfree” – Float: Product price, tax excl.
  • “currency” – String: Currency.
  • “stock” – Boolean: Product in stock.
  • “quantity” – Number: Number of products in cart.
  • “category1” – String: Product’s level 1 category (up to 6 tree structure levels possible; from “category1” to “category6”).


var tag = new ATInternet.Tracker.Tag();
    "id": "34",
    "currency": "EUR",
    "turnovertaxincluded": 547.4, //Shipping fees included + discount 10€
    "turnovertaxfree": 447.76, //Shipping fees included + discount 8€44
    "creation_utc": 1514973161, //UTC timestamp in seconds
    "quantity": 1,
    "nbdistinctproduct": 1
    "id": "27",
    "status": "charged",
    "promocode": ["DQQYRZSJ", "UN1ENE27"],
    "firstpurchase": false
    "delivery": "My carrier",
    "costtaxincluded": 8.4,
    "costtaxfree": 7
tag.ecommerce.transactionConfirmation.payment.set({"mode": "Credit card"});
    "id": "1",
    "variant": "1",
    "$": "laptop_A56",
    "brand": "ACER",
    "discount": true,
    "pricetaxincluded": 549,
    "pricetaxfree": 456.2,
    "currency": "EUR",
    "stock": true,
    "quantity": 1,
    "category1": "Computers_and_Networking",
    "category2": "Computers",
    "category3": "Laptops"


Transaction confirmation on server-side

You can validate a cart awaiting payment event by generating a HTTP GET call on server-side:

https://collect-euw1.YOURDOMAINLOG/hit.xiti?s=XXXXX&col=2&events=[{"name":"transaction.confirmation","data":{"cart_id":"XXXXX", "transaction_id":"XXXXX", "offsite_confirmation":true}}]&rdt=off

In this call, you must replace values XXXXX by :

  • the site number concerned by the transaction:
  • the cart ID to be validated:
  • the transaction ID:

It is recommended to encode the content of the parameter events, in order to ensure the correct transmission of information.




Tagging methods

  • tag.ecommerce.transactionConfirmation.cart.set
  • tag.ecommerce.transactionConfirmation.transaction.set
  • tag.ecommerce.transactionConfirmation.shipping.set
  • tag.ecommerce.transactionConfirmation.payment.set
  • tag.ecommerce.transactionConfirmation.products.set

Cet article a-t-il été utile ?

Last update: 19/05/2020