📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

My Improved Obsidian Habit Tracker: Simpler, Faster, Better

Mike Schmitz17:40

Transcription

A while back, I shared how I track habits in Obsidian using a canvas dashboard. And that video helped a lot of people set up their first Obsidian habit tracking workflow. But there were three problems with that setup.

First, it required Tracker, a powerful community plugin, but one which added friction and meant more things that could break whenever Obsidian got updated. Second, customizing it took way longer because everything was hardcoded into the code snippet itself. And third, it was really slow to load the data whenever you went to view that dashboard.

So, I rebuilt the whole system using a single plugin that you're probably already using, data view. The new version is faster to set up, easier to customize, doesn't require any updating, displays your dashboard data instantly, and now shows even more habit data all in one place. And in this video, I'm going to walk you through the complete setup process step by step so you can have the same system running in your own Obsidian Vault in just about 20 minutes.

Now, before we get into the setup, I want to make the case for why you'd want to track habits inside of Obsidian at all, because there are plenty of dedicated habit tracking apps out there. Some of them are really nice. So, why not just use one of those?

Well, the answer, my friend, is context. Most habit tracking apps are built around the don't break the chain concept, which is popularized by comedian Jerry Seinfeld. Story goes that a young comic came up to Seinfeld after a show once and asked if he had any advice for an aspiring young comic. Jerry told him, "Get a big wall calendar and put a big red X on each day that you write new material. After a while, you'll have a chain," he said. "And your only job then is to not break the chain."

Now, the principle here is that seeing that chain or streak grow is pretty motivating. And often that's enough to keep you going when you don't really feel like it. There's something powerful about seeing a long streak develop like that and not wanting to mess it up by breaking it.

Now, any app can help you track your streaks. But here's what a dedicated habit tracking app cannot do. It cannot tell you why you broke that chain. Why? When I look at my reading habit in Obsidian, for example, and I see a two-day gap, I can actually go back to my daily notes from that stretch and figure out what was happening. Maybe it was a stressful season at work. Maybe my energy was low. Maybe I was traveling. The context is all right there sitting in my daily notes right next to the data that's fueling my habit dashboard because it's all in the same system. And that is something a standalone app will never be able to give you. It can show you the gap, but it can't help you understand it.

And that matters most when you sit down to do your reviews. The goal is not just to see how consistent you were. It's to understand your patterns well enough to help you actually get better. To make those small 1% improvements, you need to understand why your system broke before you can accurately diagnose and fix it. That requires context. And if you use your daily notes the way that I do, Obsidian is where all that context already lives. So that's why I track habits here instead of a separate app. Everything's connected and that's kind of the whole point.

Okay. Okay, now before we build anything, let me show you what the finished product looks like so you know exactly what you're working towards. And if you want a done-for-you version of this, I've actually included the updated version of this dashboard in my practicalpm starter vault, which you can download for free right now at vault.practicalpkm.com. I highly recommend you download that if you are following along at home.

So this is my habit tracking dashboard. It's a canvas file in Obsidian, and each habit gets its own card on the canvas. As you can see, I'm currently tracking five different habits: reading, writing, planning, prayer, and shutdown. And each one has its own calendar view with streak stats built right in.

Each card shows a full month calendar grid laid out Monday through Sunday. Completed days show up as solid green circles. Missed days, which means a daily note exists, but I didn't check the box, show up as red rings, and the days without any data are just plain numbers. But here's the part I really love. When you complete consecutive days, the dashboard draws green connecting lines between them. So your streaks become this visual chain across the weeks and months in your habit calendar. You can literally see your consistency at a glance and once the chain starts forming, you really don't want to break it.

You can also navigate between months using the previous and next buttons at the top of the calendar. And if you click on any date, it opens the daily note for that day. So if you notice a gap in your streak and you want to know what happened, you're one click away from getting that context.

Now below the calendar on each card, you've also got a stats bar with five different numbers. The current streak is how many days in a row you've completed this habit leading up to today. The longest streak is your personal best, shown in gold, which is a great motivator. The longest break is your biggest gap between completions, shown in red. This is honestly one of the most useful numbers because it shows you your worst-case pattern. If your longest break is 3 days, it tells you something very different than if it's 3 weeks. And then you've also got your overall completion percentage from all the daily notes in your vault, as well as the total number of days completed.

Now, the key to making this actually work is to remove as much friction as possible when you're logging these habits. So, to log the habits that you see here really only takes about 30 seconds every day. I open my daily note. I go to the properties. I toggle the boxes for the habits I completed and I'm done. That's it. This is not meant to be a journaling session or a deep reflection every single day. It's a quick data entry point. The dashboard is where you do the reflecting and you can do that on your own schedule. Maybe during your weekly review when something feels off or like I said earlier as part of your quarterly personal retreat.

So when you look at this dashboard and you notice a gap forming, that's your signal to click into those daily notes from that period and figure out what actually happened here. The dashboard shows you the pattern, but the daily notes have the data. That's where you figure out what went wrong and act on it.

Okay, so to set this up, you first need to add some habits that you want to track to your daily notes template file. The habits are tracked using checkbox properties in your daily note properties. The ones that I use are actually included in my current daily note template file, which is also inside that free Obsidian starter vault. You can find that and modify it to your liking in the templates folder.

Now, if you're adding these from scratch, just add a checkbox property for each habit you want to track and set the default value to false. That's going to make it unchecked by default. Now, when you create a daily note using this template, those properties will appear at the top as checkboxes that you can toggle. So, just click a checkbox and the default value changes from false to true. Toggle the checkboxes for the habits that you complete each day and you're done. That's the entire check-in workflow.

Now, a piece of advice that I learned the hard way. I recommend you actually track fewer habits here than you think you should. I know it's tempting to throw 15 things on this list: drink water, meditate, read, exercise, journal, take vitamins, stretch, floss. But if you're trying to build consistency, a shorter list is way more effective than a longer one. I keep mine between three to five habits at a time. I add them one at a time and I only add the ones that I genuinely care about sustaining right now. Not everything I theoretically want to do in an ideal version of my life. The things that I have firmly established as habits already, like Bible reading and stretching every day, I don't bother tracking here. The ones that appear in my daily note template are the ones that I'm trying to establish.

So, the key is to keep this simple and minimal. If your daily check-in takes 30 seconds, you'll do it every day. If it takes 5 minutes, because you're starting to list 15 things and you're trying to remember which ones did I do, which ones did I not do, you're going to start skipping days. And then you're going to stop checking in entirely. Then the whole tracking system completely falls apart. And I've been there. The short list keeps the friction low enough that the habit of tracking your habits actually sticks.

Now, for the mobile workflow, this is actually dead simple. In fact, most of the time that I log my habits, I'm doing it on my iPhone. You just open Obsidian on your phone, tap into today's daily note, toggle the checkboxes in the properties section, and you're done. Since I have quite a few properties in my note, I find it helpful to show these properties in the right sidebar instead of at the top of the note. This requires hiding the properties at the top of the note, which you can do by going to settings, editor, properties in document, and changing the setting to hidden. And then to show those properties in the right sidebar, open up the command pallet and run the properties view show file properties command.

I also have it set to open straight to today's daily note whenever I open Obsidian on my phone, which you can configure under settings, files and links, default file to open. So whenever I open Obsidian on my phone at the end of the day, it takes me straight to the daily note. I swipe to see the right sidebar and I just check the boxes for the habits that I completed that day.

And just so you understand what's happening under the hood here, when the dashboard reads your data, it's looking at these front matter properties across every note in your daily notes folder. A property set to true means that you completed the habit that day. False means you didn't. That's the raw data. And minimizing the friction when logging it means it's much more accurate. So everything that the dashboard shows you, the calendar view, the streaks, the breaks, the completion percentage, it all comes from reading those true/false values across all your daily notes.

Now, if it helps, let me walk you through why I picked the five habits that I'm tracking right now. Reading and writing are the two creative habits that drive my creator business. If I'm not reading, I'm not getting new ideas. If I'm not writing, I'm not synthesizing those ideas, figuring out what I think about them, and turning those ideas into content. Planning is my morning planning session where I look at my calendar, my task list, and I decide what I'm actually going to focus on that day, and then I time block my day in my Supernote Nomad. Prayer is a spiritual discipline I'm trying to get a little bit better at. And shutdown is my end of workday routine where I close out my tasks, review what got done, and mentally clock out so I'm actually present with my family in the evening.

Now, notice that none of these are things like drink eight glasses of water, or do 50 push-ups. Those quantitative habits might be worthwhile, but in my opinion, they don't need a tracking dashboard in Obsidian. The habits that I track here are the ones where consistency compounds over time and where I want to see long-term patterns emerge, not just check today's checkbox. So, that's a good filter to use when you're deciding what to put on your own habit list.

Okay, so now let's build the dashboard. I'm going to walk you through this step by step, but I got to say up front, even if you've never touched a line of code before, there's really only one thing in this entire setup that you absolutely need to change to make it your own. Everything else you can just copy and paste directly. So, there's two places where you're actually going to change text, but one thing that drives all of the data in the dashboard, and that one thing is the habit property, which is just the name of the checkbox in your daily note front matter that corresponds to the habit that you're tracking. I'm going to show you exactly where to find it and what to change it to when we get there.

Okay, so first to add these charts, you really just need a new canvas file. And I call mine habit tracking dashboard. And then you just add cards for each habit that you want to visualize. Each habit gets its own card with a data view.js code block that handles everything: reading your data, calculating the streaks, and rendering the calendar.

Now again, I generated these using clawed code just like the new journaling dashboard that I described in this other YouTube video here. So to create the charts, you just drag in a card, edit the code in the card, and paste in the code block. Now, there's a lot going on in this code, but I'll walk through a little bit of it here.

So, first at the very top is three back ticks and the word data view.js, which tells Obsidian that this is a code block and it should use data view to try to render it. The first section is the configuration section. This is where you change the habit that you want to track by typing the name of the property right here. That's the one thing you absolutely have to change. The next section creates a unique ID based on that habit property name. And the next big section is how it calculates the streak statistics. The next section is the function to render the calendar. A section for getting all the daily notes from the property based on the daily notes folder location. Creates a map of dates for the habit completion. Calculates the streaks. Gets the first and last days of each month, gets the starting day of the week, which I have set to Monday, gets the month name, adds previous month dates, adds days from the current month, and builds an HTML calendar that includes both a next and previous button. This is the only other place where you might need to change something as the header text and the emoji that show up at the top of the calendar appear here. Then it renders each cell, checks for connections, has special logic for horizontal connections and weak wrapping connections, uses darker colors for the previous month, defines the style for the dots, and also has a bunch of stuff here for displaying the line elements in the calendar. Below that is the HTML grid section. Now, at the very bottom, there's a section here which renders everything and creates event listeners to update when things get clicked on. At the very bottom, of course, there are three back ticks to close the code block.

So, that's basically what the code does. But there is one variation I want to show you here, and that is for my shutdown habit. That's my end of workday routine. I only do this on the weekdays. So, I have a slightly modified version of the code that actually skips weekends entirely. It doesn't count Saturdays or Sundays as missed days, and it doesn't break your streak if you skip the weekends. So if you have habits that are weekday only, like a work routine or a commute related habit, then this variant can be really handy. Modify that code block from the starter vault if you want that functionality.

But here's what I really want you to take away from this video. You do not need to be a power user to set this up. If you can create a canvas file, paste in a code block, change two lines of text, and toggle checkboxes in your daily note, you can have this running in your vault today. It's all built on one code block per habit. And once it's in place, you never have to touch this code again. You just check your boxes and let the dashboard do the rest.

So that's the dashboard setup. Now, let me show you how I actually use this day-to-day because the system is only as good as your habit of using it.

Now, daily interaction, as I mentioned before, is actually pretty minimal. When I complete a habit, I check the box in my daily note, as I described earlier on my phone at the end of the day. That's it. Tracking all my habits takes about 10 seconds. The dashboard isn't something that I look at every day, but it's there when I need it.

Where it really earns its keep is in my reviews. So, about once a week, I'll pull up the dashboard and I'll just scan for patterns. Not to judge myself, just to notice if anything feels off. Did I consistently miss my reading habit on Thursdays? Was there a stretch where I was firing on all cylinders? The calendar view makes those patterns obvious in a way that a simple streak number never could.

But the number that is most interesting to me is not the current streak or even the longest streak. It's the longest break. That number tells a different story. A long break is not a moral failure, but it is a signal that something is off. It's telling you that something happened during that stretch that made this habit especially hard to maintain. Or maybe you just don't care enough about this thing to do it consistently anymore, which is completely fine.

But when I sit down for my quarterly review and I see a longest break of say 18 days, my first question isn't why did I miss this so much, I try to figure out what was going on during those 18 days. And because all of that context lives right there in Obsidian in my daily notes, my journal entries, my weekly reviews, I can actually go find it. That's the mindset shift that makes this system work. You're not tracking habits to create guilt if you don't do them. You're tracking habits to create data that supports the behavioral change that you want to make. That data is something that you can actually learn from. A streak is motivating, but understanding why the chain broke and what was happening in your life when it did, that's what helps you actually build better habits over time.

So, that's my updated habit tracking system. A custom canvas dashboard that gives you a calendar view of your completions and a streak summary of your current streak, longest streak, longest break, all powered by simple checkboxes in your daily notes.

Now, if you want to get started with this quickly, I put together a free starter vault that includes the full habit tracking dashboard that you saw in this video, but it's not going to look the same because there's no daily note data in there to populate it with. The code blocks are all there, though, if you do want to customize them and add them to your own Obsidian vault. It includes the exact code blocks that I showed you in this video along with the daily note template file with all the checkbox properties already set up. So, if you haven't yet, you can download it for free right now by going to vault.practicalpkm.com.

And if you want to take this even further, if you want your habit data to be part of a bigger life operating system that connects your daily notes, your weekly reviews, your quarterly retreats, and your long-term goals all in one place, that's exactly what Life HQ is for. The dashboard that we built today is a great standalone tool, but inside of Life HQ, it becomes one piece of a much bigger picture. Your habits, your projects, your reading, your journaling. It's all connected, all in Obsidian, all in one epic pre-built vault. Life HQ also has over 60,000 words of documentation, so you can customize things just the way you like them and really make it your own. So, if that sounds interesting, you can find out more at lifehq.practicalpkm.com.

Thanks for watching and we'll see you in another video.