Back to templates

Web Analytics

Build your own real-time web analytics app using Tinybird

Web Analytics

The Web Analytics template helps you set up your own web analytics platform using Tinybird's Events API and Endpoints.

Built with privacy and speed as top priorities, this template lets you get real-time metrics in a pre-built dashboard in just a few minutes without any knowledge about Tinybird and extend it with custom events tailored to your specific use cases (eCommerce, marketing, etc.).

Set up the project

Fork the GitHub repository and deploy the data project to Tinybird.

Copy
# select or create a new workspace
tb login

# deploy the template
tb --cloud deploy --template https://github.com/tinybirdco/web-analytics-starter-kit/tree/main/tinybird

# copy the dashboard token
tb --cloud token copy dashboard

Deploy the dashboard to Vercel or use the hosted dashboard at https://analytics.tinybird.co/ using the Workspace dashboard token.

Send events from your site

Copy the snippet and paste it within your site <head> section:

Copy
<script
  defer
  src="https://unpkg.com/@tinybirdco/flock.js"
  data-token="TRACKER_TOKEN"
></script>

Get your tracker token from the Tinybird dashboard or using the CLI:

Copy
tb --cloud token copy tracker && TRACKER_TOKEN=$(pbpaste)

Use the data-host attribute to set your Tinybird host URL. Defaults to https://api.tinybird.co/.

Local development and mock data

See the Tinybird and dashboard READMEs.

Want to see an example?

Check out these real use-cases built with Tinybird.

Canva

Designing brilliant user experiences with Tinybird.

/ Read the storyExplore the template Canva

FanDuel

Scoring big with real‑time insights via Tinybird.

/ Read the storyExplore the template FanDuel

Vercel

Using Tinybird to help developers ship code faster

/ Read the storyExplore the template Vercel

Framer

Upgraded user‑facing analytics to real‑time with Tinybird.

/ Read the storyExplore the template Framer

Skip the infra work. Deploy your first ClickHouse
project now.

Read the docs
Tinybird wordmark