<
HomeTo successfully install Salesfire on a bespoke platform, please follow the guides below to ensure all key events such as purchases, product views, and basket activity are tracked correctly. Completing these steps will enable a smooth and fully optimised custom integration.
Basket tracking enables cart events to be sent to Salesfire, allowing dynamic population of basket contents in your Abandoned Order email flow.
Step 1 - Add the following script to track add to cart events per product:
The following script is required for Salesfire to track an add to cart event.
Ensure this script is added to your site and triggered for each product whenever it is added to the cart.
Where sku is shown, replace it with the SKU variant for the specific product.
<script>
window.sfDataLayer = window.sfDataLayer || [];
window.sfDataLayer.push({
"ecommerce": {
"add": {
"sku": "SKU123",
"name": "Test Product",
"category": "Test Category",
"price": 25.00,
"quantity": 2,
"currency": "GBP",
"link": "https://site.com/test-product",
"image_url": "https://site.com/images/test-image.jpg"
}
}
});
</script>
Step 2 - Add the Remove from cart tracking script per product:
Salesfire also requires the following script to track remove from cart events.
Ensure this script is added to your site and triggered for each product when it is removed from the cart.
Replace the sku value with the correct SKU variant.
<script>
window.sfDataLayer = window.sfDataLayer || [];
window.sfDataLayer.push({
"ecommerce": {
"remove": {
"sku": "SKU123",
"name": "Test Product",
"category": "Test Category",
"price": 25.00,
"quantity": 2,
"currency": "GBP",
"link": "https://site.com/test-product",
"image_url": "https://site.com/images/test-image.jpg"
}
}
});
</script>
