Transaction events (Sales Insights)

  • iOS
  • watchOS
  • tvOS
 

Foreword

If you can’t see the “Sales Insights” menu entry in Explorer, please get in touch with us so we can activate this for you.

 

Transaction events

With the tracker, an ecommerce instance is available, exposing different objects and methods useful for measuring transaction confirmation.

Additionally, it’s possible to enable automatic tagging of SalesTracker orders by overriding the “autoSalesTracker” configuration variable:

The Sales Insights collection domain must be indicated via the “collectDomain” configuration variable:

See the full list of Ecommerce configuration variables that can be overridden at the end of this page.

 

Transaction confirmation

Measuring transaction confirmations is done by creating a TransactionConfirmation object, to which the following can be associated:

  • A list ofPromotionalCodes-type promo codes
  • An ECommerceCart-type cart
  • Client data in an ECommerceCustomer-type object
  • Shipping data in an ECommerShipping-type object
  • Payment data in an ECommercePayment-type object
  • Transaction data in an ECommerceTransaction-type object
  • A list of products, products, which can contain one or several ECommerceProduct-type products.

A cart’s properties should be declared as a Dictionary-type collection, with different keys:

  • “id” – String: Cart ID.
  • “currency” – String: Currency.
  • “turnoverTaxIncluded” – Float: Total amount of cart, including tax (shipping costs included).
  • “turnoverTaxFree” – Float: Total amount of cart, excluding tax (shipping costs included).
  • “creation_utc” – Date: Date of creation of the cart (timestamp UTC in seconds).
  • “quantity” – Number: Total number of products in the cart.
  • “nbDistinctProduct” – Number: Number of distinct products in the cart.

A promotional code should be declared as a label/name.

The transaction ID should be declared in a property:

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

Delivery data should be declared as a Dictionary-type collection, with different keys:

  • “delivery” – String: Name of shipping company.
  • “costTaxIncluded” – Float: Amount of shipping costs, including tax.
  • “costTaxFree” – Float: Amount of shipping costs, excluding tax.

Payment method should be declared in a property:

  • “mode” – String: Payment method.

Client data should be added in a property:

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

A product’s properties should be declared in a Dictionary-type collection, with different keys:

  • “id” – String: Product ID (mandatory).
  • “variant” – String: Product variant (size, colour, etc.).
  • “name” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product (0 for no; 1 for yes).
  • “priceTaxIncluded” – Float: Price, including tax.
  • “priceTaxFree” – Float: Price, excluding tax.
  • “currency” – String: Currency.
  • “stock” – Boolean: Product in stock (0 for no; 1 for yes).
  • “quantity” – Number: Number of products in the cart.
  • “category1” – String: The product’s level 1 category (up to 6 tree structure levels are possible; from “category1” to “category6”).

If you use double tagging with SalesTracker, you will need to declare the confirmation page as a main goal.

Exemple

Declaring and adding a screen are necessary for SalesTracker order tagging.

 

Appendix

 

Configuration variables

Name Default value Description Version
collectDomain “” Sales Insights collection domain  >= 2.12.0
autoSalesTracker false Enable automatic measurement of SalesTracker order content upon a transaction confirmation event  >= 2.12.0
Was this post helpful?
Yes
No
Last update: 08/01/2019