Transaction Event (Sales Insights)



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.

It is possible to enable in addition an automatic tagging for SalesTracker orders by overloading a setup variable “autoSalesTracker” available in sub-object “Ecommerce“:

var config = {
    Ecommerce: {
        autoSalesTracker: true
var tag = new ATInternet.Tracker.Tag(config);

See the full list of setup variables that can be overloaded at the bottom of the page.


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.customer.set()
  • tag.ecommerce.transactionConfirmation.products.set()

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

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

  • “id” – String: Cart ID (this parameter is mandatory).
  • “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 promotional code table may include one or several codes. A promotional code is declared as a label.

The transaction ID must be declared in an object with the property:

  • “id” – String: Transaction ID (this parameter is mandatory).

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.

Client information must be declared in an object with the following property:

  • “new” – Boolean: New client (0 for no; 1 for yes).

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.).
  • “name” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product (0 for no; 1 for yes).
  • “priceTaxIncluded” – Float: Product price, tax incl.
  • “priceTaxFree” – Float: Product price, tax excl.
  • “currency” – String: Currency.
  • “stock” – Boolean: Product in stock (0 for no; 1 for yes).
  • “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”).

If you are using Sales Tracker double tracking, you will need to declare the confirmation page as a goal page.


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"
});["DQQYRZSJ", "UN1ENE27"]);
tag.ecommerce.transactionConfirmation.transaction.set({"id": "27"});
    "delivery": "My carrier",
    "costTaxIncluded": 8.4,
    "costTaxFree": 7
tag.ecommerce.transactionConfirmation.payment.set({"mode": "Credit card"});
    "new": 0
    "id": "1",
    "variant": "1",
    "name": "laptop_A56",
    "brand": "ACER",
    "discount": 1,
    "priceTaxIncluded": 549,
    "priceTaxFree": 456.2,
    "currency": "EUR",
    "stock": 1,
    "quantity": 1,
    "category1": "Computers_and_Networking",
    "category2": "Computers",
    "category3": "Laptops"



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.customer.set
  • tag.ecommerce.transactionConfirmation.products.set

Setup variables

Name Default value Description Version
Ecommerce.collectDomain “” Sales Insights collect domain  >= 5.13.0
Ecommerce.autoSalesTracker false Enable automatic SalesTracker order content measurement on a transaction confirmation event  >= 5.13.0

Was this post helpful?

Last update: 07/05/2019