Releases: tinybirdco/web-analytics-starter-kit
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
1.6.7: feat: add user agent validation to middleware (#172)
limit the size of the payload to 10k chars and the user agent attribute to 500 chars
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
Next.js <Script /> component only allows valid HTML attributes and data-* attributes to be passed as props.
<script
src="https://unpkg.com/@tinybirdco/flock.js"
data-token="TOKEN-ID"
data-tb-customer-id="CUSTOMER_ID"
></script>
Would append "customer_id":"<CUSTOMER_ID>" to the rest of variables saved in payload column.
This change is backwards compatible.
1.6.0
Web vitals
Track web vitals like this:
<script
src="https://unpkg.com/@tinybirdco/flock.js"
data-token="TOKEN-ID"
web-vitals="true"
></script>
You'll start receiving events with web_vital
action, the payload looks like this:
{"name":"LCP","value":68,"delta":68,"id":"v3-1752067824029-4726354841567","pathname":"/","href":"http://localhost:8081/"}
{"name":"TTFB","value":41.10000002384186,"delta":41.10000002384186,"id":"v3-1752067821037-7353415626830","pathname":"/","href":"http://localhost:8081/"}
{"name":"FCP","value":120,"delta":120,"id":"v3-1752067821037-7485331818919","pathname":"/","href":"http://localhost:8081/"}
{"name":"INP","value":0,"delta":0,"id":"v3-1752067821037-7066346355405","pathname":"/","href":"http://localhost:8081/"}
{"name":"CLS","value":0,"delta":0,"id":"v3-1752067821037-6535975895510","pathname":"/","href":"http://localhost:8081/"}
These are the different metrics tracked and their meaning:
Metric | What it Measures | Your Value | Good Value | Status |
---|---|---|---|---|
LCP | Load performance | 68 ms | < 2500 ms | Excellent |
TTFB | Server responsiveness | 41.1 ms | < 500 ms | Excellent |
FCP | First contentful paint | 120 ms | < 1800 ms | Excellent |
INP | Interaction responsiveness | 0 ms | < 200 ms | No data |
CLS | Visual stability | 0 | < 0.1 | Perfect |