How to track habits in Obsidian (includes Canvas dashboard setup)

4.61k views2950 WordsCopy TextShare
Mike Schmitz
After a lot of trial and error, I've landed on a 2-part Obsidian-based habit tracking system: 1) a s...
Video Transcript:
there are a couple of dedicated habit tracker plugins available for obsidian but none of these have ever worked the way I want them to basically I just want to be able to have a couple of habits that I track on my daily note every day and a way to see my streaks and data visually as part of my quarterly review process so over the years I've been forced to craft my own habit tracking workflow inside obsidian and I've made an accompanying habit tracking dashboard that I've set up in canvas so that I can visualize my
habit tracking data and in this video I'm going to walk you through setting up the same workflow for yourself using daily notes and a couple of community plugins now before we get to the workflow itself let's talk briefly about habits in general personally I believe that habits are more important than goals because when it comes to long-term achievement and results consistency is more important than intensity if you can do just a little bit every day that will always produce more in the long run than the occasional heavy lift so I try to consist stantly take
action on things that are both important but not urgent like writing reading and planning the next day those are the three habits that I'm trying to crease and those are the ones that I'll use in the example workflows in this video now most habit tracking apps are built on the don't break the chain concept which is popularized by comedian Jerry Seinfeld and just in case you haven't heard this yet the story goes something like this Seinfeld was approached by a young comic after a show once and was asked asked what do I need to do
to become a great comedian Seinfeld responded by telling the aspiring comic that the way to become a great comedian was to write great jokes so he should get a big wall calendar and put a big red X on every day where he wrote new material after a while you'll have a chain and at that point your only job he said is to not break the chain there is something motivating about seeing those streaks continue to grow and while lots of apps and plugins have ways to track and visualize those streaks I wanted something simple that
I could track easily from inside my daily note in obsidian now my workflow is optimized to remove friction when tracking the habits so if that's what you're optimizing for then this workflow may be for you here's how to set it up for yourself and start tracking habits in obsidian from your daily note first you need to set up the habits that you want to track as tasks inside of your daily note template so the first thing to do is to make sure that you have the daily notes core plug-in enabled then go to the Daily
note setting and select the template file that you want to use when you create a new daily note in obsidian this will eliminate the need to manually add the checkboxes every single time and if you want a starting point I've actually included the daily notes template file from this video inside of my free starter vault which you can download at practical pk.com vaa next you need to configure that template file now I've got a lot going on in this example but I'm going to going to focus just on this section here that I use for
habit tracking now to track habits on your daily note all you really need are the checkboxes and the task names in this example I have three habits that I'm currently tracking writing reading and planning but instead of just leaving these as normal task bullets inside of my daily Note file I've put them inside of a custom call out now you can create a call out by using the greater than sign a space and then the call out code and title the call out code is inside of square brackets and the type of call out is
indicated by using an exclamation mark and then the call out name there are a bunch of built-in call outs like info warning and success which you can view by right- clicking on the code icon in the upper right of the call out when in edit mode and just select the call out type that you want to use but the one that I'm using here is actually a custom call out which takes a little bit more to set up we'll get to that in a second but first let's finish talking through this call out so we've
got the call out type set to habits which I'll walk through setting up in a second but then you'll see a plus icon right after the call out type before the title this tells obsidian to make this call out a collapsible call out and the plus character indicates that this collapsible call out should be open by default if you prefer that your call out be closed by default just use a minus character here instead now the the last thing on the first line is the call out title in this case it's habits and that's the
text that will appear at the top of the call out in our daily note when we create it now to Nest the tasks inside the call out all we need to do is add a greater than character and a space on each line below that we want to include in the call out there are three tasks here on three separate lines so each line has to have the greater than character and space added otherwise the task will just appear outside the col out now the first line that doesn't start this way tells obsidian this is
where the call out should end okay so that's how the call out works now let's go look at how we set up this custom call out the custom call outs that I have are configured using a community plug-in called callout manager to create a custom call out in callout manager go to the obsidian settings and open the call out manager settings click on the manage call outs button and you'll see all of the custom call outs that you have configured for the call out manager plugin inside of your obsidian Vault to create a new custom
call out you can click the plus button at the top but I have one here configured for habits so instead I'm going to click on the pencil icon to go edit the settings for this particular custom call out now here you can see a couple of things about this call out first you see the name which I've set as habits using that name when we create a custom call out tells obsidian to load up that callout class next we have the color I'm using orange but if you want to change this you can select from
the list or click on the color and choose one from the Color Picker interface next is the icon clicking on this shows all of the available icons that we can use at the beginning of our custom call out you can search the icons by clicking up here and typing text in the bar and in this case I'm using the Lucid Das atom icon when I think of habits I tend to think of atomic Habits by James CLE so I feel like this icon really represents what this call out is all about once you've set the
name the color and the icon you can close the settings and you can now call this custom call out whenever you create a note with a call out in it okay so now we've got our template set up we've got our custom call out configured so when we create a new daily note we can simply go to the habits call out and check the boxes for the habits when we complete them but we still don't have a way to visualize that data like a lot of habit tracking apps provide so for this we're going to
need another Community plugin called tracker this plugin gives you a bunch of ways to visualize data in your daily notes I also use this plugin for my daily questions journaling workflow that I walk through in this other YouTube video so click here if you want to see that entire workflow but for now to install tracker just go to the community plugins directory install and enable the tracker plugin and then go to the tracker settings and make sure that it's pointed at your daily notes folder and that the date formatting is the same as what you
use for your daily note files once that's done we can start building our dashboard now for the the dashboard we're going to use some tracker codes that can be added to really any obsidian note but as I mentioned in this other video on setting up dashboards in obsidian I prefer to do this now in canvas by creating cards and dropping the tracker codes in there this allows me to have more control over the layout of the charts and the data that it shows me so I've actually set up a habit tracking dashboard canvas that has
three blocks one for each habit that I'm currently tracking in obsidian now each block has two code Snippets one that shows the streak in a monthly calendar view and below that one that shows the numerical streak data let's look at the calendar view snippet first so here's the code that I use for this and I'll talk through how I set this all up the first line is the standard three back ticks and then the word tracker and this tells obsidian that this is a code block and that it should use the tracker plug-in to render
everything that you're going to see here the next line is search type colon and then task done and this tells tracker that it should look for data that matches specific criteria in this case it's tasks that are completed now the second line is search Target colon writing which tells tracker that it should look for tasks that are named writing and that matches the writing habit that we have set up in our daily note template now the next line is data set Name colon writing and this just tells the calendar to use writing at the top
of the calendar view the next line is start date colon and then the date January 1st in the year year year year dmon month- DayDay format now you don't really need this but this can limit the amount of data that the tracker plugin has to search through so if your charts are taking a while to load you might want to consider adding this in the next line is simply month colon which indicates that the data should be displayed in a monthly calendar view and the nested line below that is start week on colon and then
the three-letter abbreviation for Monday inside of single quote marks and this tells tracker that Monday should be the first day of the week displayed on the calendar and then finally the last line has three back ticks that indicates the end of the code block now when this code block is rendered it shows a color dot for each day where we completed our writing habit and these dots are linked together to indicate a chain or a streak in the days where we didn't complete the Habit our left blank this makes it easy to see visually what
days we completed our habits and which days we missed and this gives us a general sense for how consistent we've been but there are a few other data points that I find helpful so I've actually got another code block below this which shows my longest streak my longest break and the length of the current streak so here's the code snippet for this block and again again let's talk through how to set this all up now the first part is actually exactly the same the first line is three back ticks and then the word tracker the
second line is search type colon task. done to show the completed tasks the third line is search Target colon writing to show only the writing tasks and the fourth line is start date colon in the same January 1st date in the year year year year-month month- DayDay format but the next part is where things get interesting so the fifth line is just the word summary followed by a colon and then the indented line below that indicates what data should show up in that summary that line starts with the word template and a colon and then
all the data that we want in our summary enclosed in double quotes the first part here is just the text longest streak and that's followed by a colon and a space but then we have double curly brackets around the text Max streak and an open and close parentheses that's the code that will pull the number for the longest streak out of the data that we' told tracker to look at then after that we have plain text again for day or days and then the letter N which tells the tracker plugin to go to a new
line immediately after that n character we repeat the same code format for longest breaks followed by a colon and then Max breakes followed by an open and close parentheses inside of Double curly brackets to grab the number of our longest break or days in a row where we didn't complete our habit now after that number token again we have a space and the word day or days followed by an N for a new line and then again we have a third line which includes the text current streak which is followed by a colon then current
streak followed by an open and close parentheses inside of Double curly brackets to grab the number of the streak in our data and that is followed by the text for day or days and this is all enclosed in double quotes and the last line again is three back ticks to indicate the end of the code block all right so that's a lot of technical code but here's what the workflow actually looks like at the end of the day when I'm doing my daily journaling I make sure that I log my habits by simply tapping the
boxes to check off the tasks in obsidian on my iPhone now if you use obsidian tasks you might get a warning that pops up about not being able to accurately Mark tasks as done if you're not in preview mode so I actually use the force note View mode plugin to make all my daily notes open in preview mode on my iPhone to prevent this but when I'm logging my habits I simply check the boxes for the ones that I've completed it just takes a couple of seconds and it tells tracker that these habits were done
for this day and then when I review all my journal entries as part of my quarterly Retreat process which if you want to dig deeper into that I outline in this other video here I actually look at this habit tracking Dash dashboard to see how consistent I've been all the data is right there including the monthly view my longest streak my longest break and my current streak now one thing you may have picked up on here is that I only track a couple of habits at a time I don't bother tracking habits for things that
are firmly established in my morning or evening routines like stretching every morning or writing in my journal every evening at this point those things happen automatically and tracking them just adds more friction to the workflow the couple of Hab that I'm focused on improving are the ones that show up in my daily notes template so that I can track them using the workflow that I've outlined in this video and look at the data as part of my personal Retreat process all right so there you have it that's how I track habits and obsidian and if
you want to download and use the template that I walked through in this video it's part of my starter vault which you can download for free by going to practical pk.com Vault the starter Vault also includes a bunch of other templates as well as additional resources and tips to help you make more of your notes and ideas in obsidian and if you like this video you'll probably love my newsletter practical PKM the newsletter goes out every Monday morning and includes an original essay about how to apply more intention to your PKM system so you can
be more productive and creative a link to something cool that is usually obsidian related and my mindmap booknotes from a book that I've read recently you can sign up for the newsletter for free by going to practical pk.com thanks for watching and we'll see you in another video
Copyright Ā© 2024. Made with ā™„ in London by YTScribe.com