For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remove from cart

The following describes how remove from cart tracking is done for Firework.

How to implement the "remove_from_cart" tracking event

<script>
function onRemoveFromCart() {
    window._fwn.analytics.removeFromCart({
        "order_id": "123456789",
        "currency": "USD",
        "subtotal": "40.00",
        "total_discounts": "5.00",
        "order_value": "50.00",
        "line_items": [{
                "sku": "TSHIRT-RED-M",
                "quantity": 2,
                "price": "15.00",
                "name": "Red T-shirt (M)"
            },
            {
                "sku": "BANANA",
                "quantity": 10,
                "price": "1.00",
                "name": "Organic Banana"
            }
        ]

    });
}

// Call onRemoveFromCart() whenever there is remove from cart happening
</script>

Note: Please refer to the payload section for the required fields.

Last updated

Was this helpful?