For developers
Install Doodle
One line puts Doodle on your store. A cart bridge is optional.
1. Paste the install snippet
Your TalkDoodle contact sends it with your store's key. Paste it once, as early as possible inside <head>, on every page, so Doodle sees your store's first requests.
install snippet
<script src="https://talkdoodle.com/embed.js" data-key="pk_your_store_key" async></script>
- Loads a small script that shows Doodle in the bottom-left corner.
- Works only on your store's own domains.
- Never pays, places orders, or types card or identity details.
2. Optional: connect your cart
Shopify and many common platforms need nothing more. On a custom store, this lets Doodle add items and read your live cart directly. Swap myStore for your own cart calls.
cart bridge
<script>
function connectDoodle() {
window.Doodle.registerCart({
addItem: (itemRef, qty, options) => myStore.cart.add(itemRef, qty, options),
getCart: async () => {
const c = await myStore.cart.get(); // always read live
return {
item_count: c.count,
total: c.total, // e.g. 13.25
currency: c.currency, // e.g. "USD"
items: c.lines.map((l) => ({ line_ref: l.id, name: l.title, qty: l.quantity, line_total: l.total })),
};
},
updateItem: (lineRef, qty) => myStore.cart.setQuantity(lineRef, qty), // qty 0 removes
checkoutUrl: "/checkout",
});
}
window.Doodle ? connectDoodle() : window.addEventListener("doodle:ready", connectDoodle);
</script>On your order confirmation page, report the order so it's counted:
order report
<script>
function reportToDoodle() {
window.Doodle.reportOrder({ orderId: "ORDER-1042", total: 13.25 });
}
window.Doodle ? reportToDoodle() : window.addEventListener("doodle:ready", reportToDoodle);
</script>3. Check it's working
- Open your store in a normal browser window. Doodle appears in the bottom-left corner.
- In the browser console,
window.Doodleis defined. - Your TalkDoodle contact sees the install as Detected, then Live after the first visit.
For checkout filling, standard autocomplete values (name, tel, email, street-address) work best.