Events

Events is the key to telling Aikey what the user is doing on the site

There is 3 different basic events in Aikey avaible for tracking user interactions on your site.

 


Show

This is the most basic event you can register on Aikey. It is best placed on a single view page of a product. If you add this on the load of a page. Make sure to put it inside the loaded method.

Aikey.event({
  type: "show", 
  sku: "product-id-abc-123",
}, callback);

Add to cart

The add to cart event should be triggered when a product is added to the cart.

Aikey.event({
  type: "addToCart", 
  quantity: 1,
  sku: "product-id-abc-123",
}, callback);

Purchase

The purchase event is triggered when a purchase is made on your site. This will in the javascript SDK automatically end the users session.

Aikey.event({
  type: "purchase", 
  orderId: "web-123",
  orderTotal: 124.23,
  currency: "EUR"
}, callback);