Help Centre

<

Home
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

The following script is required for Salesfire to track an ‘add to cart’ event. Please ensure this is added to your site and triggered when a product has been added to the cart. This means basket updates can be tracked. Where SKU is mentioned the example, please use the SKU variant.

<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"
            }
        }
    });
</script>

Step 2

Salesfire will also require the following script to be added to your site. Please ensure this is added to your site and triggered when a product has been removed from cart. This means basket updates can be tracked. Where SKU is mentioned the example, please use the 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"
            }
        }
    });
</script>

To ensure accurate data, make sure SKU variant and quantity fields are included.

Check Salesfire is fully integrated by following our Installation and Setup guides, including product and page view tracking.

Once completed you will see verification in the Installation page of your dashboard to confirm what tracking is in place for your Salesfire dashboard

Add to basket confirmation in the installation page

Follow our Email guide for more information on adding the basket contents dynamically to your abandoned cart emails.