If your custom add-to-cart flow needs a manual Venon event, your developer can call window.VenonATC(productId, quantity). This records the event. It does not add a product to the cart.
1. Load the Venon script
Make sure the Venon tracking script loads on the page that contains the custom button. For an external page, follow Track external landing pages.
Wait until the script has loaded before calling
window.VenonATC. The script loads asynchronously.
The function should be available in the browser as window.VenonATC.
2. Call Venon after the cart update succeeds
Find the success handler for your existing add-to-cart operation.
Pass the Shopify product ID as a string or number, and the quantity added as a number. Use the product ID, not the variant ID.
Call the function once for the successful addition. Do not call it again from a second click handler for the same action.
// Inside your existing successful add-to-cart handler:
if (typeof window.VenonATC === "function") {
window.VenonATC(productId, quantityAdded);
}
Replace productId and quantityAdded with values from your own cart code. The guard avoids an error if the script is unavailable, but it does not queue the event for later.
3. Test the custom flow
Open a product page and use the custom button to add a product. Confirm the cart actually updates.
In your browser developer tools, open the network panel and check the Venon request to
/api/feedback. The event payload should containname: "atc", the product ID, and the quantity.Check that the same successful action does not call
window.VenonATCmore than once.
The script also tries to read /cart.js for cart details. A headless storefront may not expose this Shopify endpoint, so do not assume the event will include full cart contents. Tracking Checker tests page views only, not this add-to-cart call.