You're correct. The code is exactly as you've described. More information on personalization can be found via the article below:
For the most part if you're adding it into a rich text module you shouldn't need to use HubL. However there is also a section in the article above that talks about adding Add personalization to a coded template.
I hope this helps,