Repository navigation
Multi-tenancy and multi-domain
Multi-tenancy and multi-domain
The analytics_events table has support to gather data from multiple tenants and domains. Add data-domain and data-tenant-id to your script:
<script
src="https://unpkg.com/@tinybirdco/flock.js"
data-token="YOUR_TRACKER_TOKEN"
data-domain="project_domain"
data-tenant-id="project_tenant_id"
></script>All project endpoints can be filtered by tenant_id and domain or you can use JWT tokens including the required scopes and fixed_params.
To filter endpoints for a tenant, use this as fixed params in the JWT token:
"fixed_params": {
"tenant_id": "your-tenant-id"
}Learn how to create JWT tokens