Step 1:Conversion Tracking

Variant 1 (without basket tracking):

Subsequent tracking must be integrated in the shop on the order completion page. Tracking is used to track the transactions mediated by Sovendus Optimize and to display them in the dashboard.

<script async src="https://www.sovopt.com/OPTIMIZE_ID/conversion/?ordervalue=XXX&ordernumber=XXX&vouchercode=XXX&email=XXX&subtext=XXX"></script>
ParameterDescriptionValueMandatory
OPTIMIZE_ID
Unique customer IDOPTIMIZE_IDX
ordervalue Total value of the order (z.B. 243.30)
DynamicX
ordernumber OrdernumberDynamic X
vouchercode Vouchdercode
This parameter is only mandatory in connection with voucher code tracking.
Dynamic X
emailE-mail address of the customerDynamic
subtextSelf-definable field to transmit additional information about the orderDynamic

The values ordervalue, ordervalue and vouchercode must be replaced dynamically with the effective order values. The order value must be separated by a dot and submitted as follows: Example: 50.00

The vouchercode entered during the ordering process must be submitted in the variable “vouchercode”. In case no vouchercode was entered in the ordering process an empty string can be submitted in this variable.

Variant 2 (with basket tracking):

If you want to run campaigns based on the purchased products, the basket tracking must be integrated on the order completion page in the store. The variables marked by %Variable% must be replaced by the values of the respective order. For the function gb_send to be available, the script for behavior analysis must be fired beforehand.

gb_send("event", "purchase", {
	order: {
		id: "%OrderNumber%",
		revenue: "%OrderValue%",
	},
	products: [
		{
			id: "%productId%",
			name: " %productName%",
			price: "%productPrice%",
			quantity: "%productQuantity%",
			category: "%productCategory%",
		}, ...
	],
});

Step 2: Script for behavior analysis

So that we can display your advertising campaign at the right time, the following script tag must be integrated on each page (including the checkout page).

<script async src="https://www.sovopt.com/OPTIMIZE_ID"></script>

Cart Abondement Tracking

For the use of shopping cart abandonment functions, you can send us the contents of the visitors shopping cart when adding and removing products to it as follows. The events add_to_cart and remove_from_cart may only contain the values of the changed product.

The following implementation for the recognition of the products in the shopping cart is the version we recommend. If this implementation is not possible for you, Sovendus also offers the possibility to read the products automatically. If you are interested, please contact your account manager.

Event: Add to Cart

This event must be fired whenever a product is added to the shopping cart.

gb_send('event', 'add_to_cart', {
  'id': %ProductId%,
  'name': %ProductName%,
  'price': %ProductPrice%, 
  'quantity': %Quantity%,
  'url': %ProductDetailUrl%,
  'image': %ProductImage%,
  'additionalKey': %additionalValue%
});

// Example
gb_send('event', 'add_to_cart', {
  'id': 546,
  'name': 'T-Shirt blue',
  'price': 54.50, 
  'quantity': 1,
  'url': 'https://example-shop.com/t-shirt-blue',
  'image': 'https://example-shop.com/t-shirt-blue.jpg',
  'description': 'A blue v-neck t-shirt'
});
ParameterDescriptionValueMandatory
idUnique Product ID (e.g. EAN) Integer X
name Product NameStringX
priceProduct PriceStringX
quantityQuantity of Product added to the cartIntegerX
urlLink to product detail pageStringX
imageLink to product imageStringX
additionalKeyAny number of additional Key / Value entries can be added.
This information can then be used, for example, in the shopping cart abondement e-mail
Integer / String
Event: Remove from Cart

If a product is removed from the shopping cart, the remove_from_cart event must be fired. However, this event only requires the values id and quantity.

gb_send('event', 'remove_from_cart', {
  'id': %ProductId%,
  'quantity': %Quantity%
});

// Example
gb_send('event', 'remove_from_cart', {
  'id': 546,
  'quantity': 2
});
Event: Update Cart

With the update_cart event you can set the current state of the shopping cart. This overwrites the current state of the shopping cart in Sovendus Optimize.

gb_send('event', 'update_cart', [
    {
      'id': %ProductId%,
      'name': %ProductName%,
      'price': %ProductPrice%, 
      'quantity': %Quantity%,
      'url': %ProductDetailUrl%,
      'image': %ProductImage%,
      'additionalKey': %additionalValue%
    },
    {
      'id': %ProductId%,
      'name': %ProductName%,
      'price': %ProductPrice%,
      'quantity': %ProductQuantity%
      'url': %ProductDetailUrl%,
      'image': %ProductImage%,
      'additionalKey': %additionalValue%
    }
]);


// Bespiel
gb_send('event', 'update_cart', [
  {
    'id': 546,
    'name': 'T-Shirt blue',
    'price': 54.50, 
    'quantity': 1,
    'url': 'https://example-shop.com/t-shirt-blue',
    'image': 'https://example-shop.com/t-shirt-blue.jpg',
    'description': 'A blue v-neck t-shirt'
  }, 
  {
    'id': 547,
    'name': 'Pants blue',
    'price': 20.00, 
    'quantity': 2,
    'url': 'https://example-shop.com/pants-blue',
    'image': 'https://example-shop.com/pants-blue.jpg',
    'description': 'Blue pants'
  }
]);