SDK · Embed
Install Sumidata
Pick your framework, copy the snippet, and you're recording.
index.html
<!-- Sumidata SDK -->
<script>
window.Sumidata = window.Sumidata || { push: function(m, a) { (this.q = this.q || []).push([m, a]) } };
</script>
<script
src="https://sdk.sumidata.io/loader.js"
data-project-id="YOUR_PROJECT_ID"
data-src="https://sdk.sumidata.io/sumidata.js"
async
></script>Replace
YOUR_PROJECT_ID with your real project ID before shipping.Installation · 3 steps
- Copy the snippet above.
- Drop it into your app — an HTML page, your entry module, or a layout component.
- Deploy — the SDK starts recording immediately.
For AI agents · install & self-verify
Paste this into Claude Code or Cursor to install the SDK and confirm data is flowing through the Partner API — no dashboard needed.
install-sumidata-with-ai-agent.md
You are installing the Sumidata analytics SDK on this web app and verifying it works — without opening any dashboard.
PROJECT_ID: YOUR_PROJECT_ID
API base: https://api.sumidata.io
Steps:
1. Add the SDK loader to the site's <head> on every page:
<script>window.Sumidata=window.Sumidata||{push:function(m,a){(this.q=this.q||[]).push([m,a])}};</script>
<script src="https://sdk.sumidata.io/loader.js" data-project-id="YOUR_PROJECT_ID" data-src="https://sdk.sumidata.io/sumidata.js" async></script>
2. Deploy the change.
3. Ask the human for a Partner API token (starts with "sumi_"), created for this project under Settings → API tokens.
4. Confirm data is flowing — poll until "status":"healthy":
curl -H "Authorization: Bearer <sumi_token>" https://api.sumidata.io/api/partner/health
5. Confirm events are landing:
curl -H "Authorization: Bearer <sumi_token>" "https://api.sumidata.io/api/partner/events?perPage=5"
6. Validate event metadata is clean (no violations):
curl -H "Authorization: Bearer <sumi_token>" https://api.sumidata.io/api/partner/schema/validate
Done when /api/partner/health reports "healthy" and /api/partner/events is non-empty.CDN loader · ~2 KB gzipped·or npm · @sumidata/browser·Read the install docs·Install with an AI agent