Netlify
Two lines in _redirects.
Create or edit public/_redirects
The trailing 200 is the important bit: without it Netlify redirects instead of proxying, and the browser ends up on pisi.to.
_redirects/js/llave.js https://pisi.to/js/llave.js 200 /api/event https://pisi.to/api/event 200Deploy and point the script
You can also declare this in netlify.toml if you prefer one file for everything.
html<script defer data-domain="example.com" data-api="https://example.com/api/event" src="https://example.com/js/llave.js"></script>
Check that it works
Open your site in a new tab and watch the dashboard: you should show up under "home right now" in under ten seconds. If you do not, run through the onboarding checklist.