Help Centre

<

Home
Tracking basket content for Abandoned Orders

To 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.

  1. Tracking product purchases for custom installation
  2. Tracking product views for custom installation
  3. Custom basket tracking for Abandoned Orders

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>

Important Notes
  • Ensure the SKU variant and quantity fields are always included for accurate tracking.
  • Check that Salesfire is fully integrated by completing the Installation and Setup guides, including product and page view tracking.
  • Once implemented, you will see verification in the Installation section of your Salesfire dashboard confirming which tracking events are active.

Add to basket confirmation in the installation page

  • For guidance on dynamically adding basket contents to your Abandoned Order emails, follow our Email Integration Guide.