Starter Kit

Web Analytics

Build a privacy-first, low-latency alternative to Google Analytics in less than 5 minutes using this open source Starter Kit from Tinybird.

No credit card required

Follow these 3 simple steps

In just a few clicks, deploy a fully-functional web analytics dashboard for your site.

Watch the video tutorial
1

Deploy the project

Click the button below to instantly deploy the project to a Tinybird workspace.

Deploy project

Deploy the project

This resources will be created in a new workspace in your Tinybird account.

2

Insert the snippet

Copy this code snippet, add your tracker token, and paste it into your website <head> code.

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

What does this snippet track?

This snippet tracks “page_hit” events out of the box, including very basic information with privacy in mind (timestamp, path, device type, referrer, etc.) and an anonymized session id.

Keep scrolling to learn more about how to introduce custom events and learn about privacy best practices.

3

Visualize it in a readymade dashboard

Copy the URL below, add your dashboard token, and open it in the browser. That’s it!

Dashboard URL
https://analytics.tinybird.co/?token={your-dashboard-token}

Expand it

Now, take what you’ve started and make it your own! Add custom event types, build ad-hoc queries, and design the perfect frontend on top of Tinybird APIs.

Define custom event types

The Starter Kit snippet tracks page views by default, but you can easily add custom events (e.g. button clicks, added to cart, etc.) to your website code with just a few lines of JavaScript.

View code

Track your critical metrics

Tinybird Pipes give you a simple, intuitive way to compose SQL nodes and get exactly the analytics metrics you need.

Read more

Build the dashboard of your dreams

Fork the dashboard project and create custom components just how you want them. It’s a Next.js project, so you deploy it easily on Vercel.

View repo