Settings

Theme

Ask HN: Snippet on Third-Party Website

2 points by leahcim 7 years ago · 1 comment · 1 min read


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?

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection