This guide assumes that you already have signed up for a Banana Stand account and you already have obtains a Public and Secret key.

Step 1: Include the JS in your footer for all pages

Put this in the footer of all your pages:

Step 2: Setup your product page viewing

Put this in your product pages, order success page and anywhere else where there is a context of a product.

   window.__bsio.push({ action: "setProductId", product_id: "ENTER PRODUCT ID HERE" });
   window.__bsio.push({ action: "startProductPageViewing" });

And put this where you want the view/order/cart count to show:

<div class="banana-container"></div>

Step 3: Setup order events

Using the JS api you can put this on your order success page:

window.__bsio.push({ action: "pushEvent", event_type: "order" });

You can also do this server side using one of our SDKs or the Public API.

Step 4: Setup add to cart events

Using the JS api you can run this code when a product is added to the cart:

window.__bsio.push({ action: "pushEvent", event_type: "add_to_cart" });

If you’re not in the context of a product page (ie setProductId does not happen) then you should also
pass in the product_id like this:

window.__bsio.push({ action: "pushEvent", event_type: "add_to_cart", product_id: "ENTER PRODUCT ID HERE"});

Need help installing?

For a limited time we are offering free professional customization and installation with our paid plans, so you don’t have to do anything to get started!
Please to schedule this free service.