Item Added to Cart

Trigger a proactive campaign when an item is added to the cart.

Available on:  Pro

Overview

Proactively initiate a conversation whenever someone adds an item to their cart. Using this strategically can help you increase cart values with cross-sell and upsell.

For example, when a customer adds an item to their cart, you can recommend a similar product or complimentary item that would go well with whatever they’ve chosen. Or you can encourage them to spend more to get free shipping.

See it in action

Click on either of the two “Add to cart” buttons to see how Ada proactively pops up:

Headphones

Travel Mug

How to set it up

Step 1

Follow Ada’s technical Embed documentation to learn how to add Ada to your website.

Attached is the code snippet you need to paste into the <head> tag.

⚠️ Be sure to replace <YOUR-BOT-HANDLE> with your own bot handle. Your bot handle is your bot’s unique domain name: https://yourbothandle.ada.support/.

📣Click here to learn how to load a bot on a non-US cluster.

<script
  id="__ada"
  data-handle="<YOUR-BOT-HANDLE>"
  src="https://static.ada.support/embed2.js"
></script>

Step 2

Follow the instructions on the Advanced Proactive Campaigns page to create a web campaign.

Step 3

Use triggerCampaign to launch a campaign created via the Ada dashboard in step 2.

ℹ️Use Events to measure how often Ada helps your customers succeed by tracking actions on your website, both inside and outside of their conversations with your bot. Follow this guide to learn about creating and tracking events.

const addToCartEvent = new CustomEvent("cart_addition");
let cartCount = 0;
const addToCartButton = document.getElementById("add-to-cart");

// broadcast the cart_addition event
addToCartButton.addEventListener("click", () => {
  window.dispatchEvent(addToCartEvent)
});

// respond to the cart_addition event by triggering campaign when cart
// has 3 or more items
window.addEventListener("cart_addition", async () => {
  cartCount += 1;
  document.getElementById("cart-items").innerText = cartCount;

  if (cartCount >= 3) {
    // update the cart metadata available in the dashboard
    // so it can be used in the campaign message 
    await window.adaEmbed.setMetaFields({
      cartCount,
    });
    // trigger campaign on cart_addition event when there are 3 or more items
    window.adaEmbed.triggerCampaign("Add_an_item_to_a_cart")
  }
})

See what Ada can do for you

Get your hands on our award winning platform and start offering VIP experiences for everyone, at scale.

Get a Demo