I would like to develop a snippet of code that is added to third-party websites, similar to Stripe. When added on a page, it shows a button which opens a modal with a form when clicked.
I want to minimise the effort on the client side and have them just copy-paste a short snippet such as
<script src="https://mydomain.com/snippet.js"></script>
Stripe, Hubspot, Google Analytics all do similar things.
Is there any tool to generate this? Should we use any JS framework or just vanilla JS?