home articles tutorials contact

Using Umami for analytics

Aug 31, 2024

tl;dr: In this guide I'll walk you through step-by-step how to add Umami analytics to your project or blog so you can start gathering data.

Using Umami for analytics

Umami is a simple and effortless analytics solution that you can implement with little to no knowledge of the platform.

Integrating Umami into your blog or SaaS website is really painless and can be achieved by following these simple steps:

Create an account

As I write this, Umami only support email and password accounts which is fine, but it would be nice to have a Google and/or GitHub option.

Add your website

Add your website

Adding a site to umami is surprisingly simple as all this does is generate the tracking code that sends the analytics back to the Umami platform.

To add a site you click on “Add Website” then add your site url and give it a name (the name doesn’t achieve anything other than helping you identify it).

Get your tracking code

Once you’ve added the website you’ll be able to see it on the Website tab (see image above), once it appears you can click on Edit which will take you to the below screen where you can grab the Tracking code (which is a defer script)

Get Tracking Code

Add tracking code to your sites <head>

This part depends on your setup but every website will have a <head> section, in my situation I have abstracted this into a seperate file just for the Umami tracking code.

Umami Tracking Code

Thats it

You can now head back to your Umami Dashboard and obsess over how much or how little traffic you’re getting to your site!

Important notes

My default the code will also track your localhost as traffic, which means that all the pages visits you do in your local dev environment will bump up the numbers and gets you excited, even though its not real traffic, so to combat this you can either filter !localhost in the Umami dashboard or configure your browser to not be detected by the Umami script, which will stop your visits registering all together.

© 2025 Grapplingdev. All rights reserved.