Documentation

Custom CSS & JS

Fine-tune the widget with your own CSS, and run custom JavaScript on your page for advanced use cases.

Custom CSS

Custom CSS is injected inside the widget iframe, so you can restyle its internals without affecting your site. Add it in the widget customizer's advanced section.

css
/* Example: tweak the widget's launcher shadow */
.launcher { box-shadow: 0 8px 30px rgba(0,0,0,0.25) !important; }

Custom JS

Custom JS runs on your page (not inside the widget iframe), so you can react to the widget or trigger your own logic. It's delivered over an origin-checked channel and wrapped so a broken snippet can't crash the page.

js
// Example: open the chat when a visitor clicks a “Support” link
document.querySelectorAll("a.support").forEach(function (el) {
  el.addEventListener("click", function (e) {
    e.preventDefault();
    window.EmbedMyBot.open();
  });
});
Custom JS is powerful — it runs with full access to the host page. Only add code you trust. For most integrations, the JavaScript API is safer and simpler.