I'm building a custom navigation solution using the JSOM in Sharepoint 2013.
I need to get the navigation term corresponding to the current page and I found this question with a similar problem and the top-voted answer suggested using
However, on my aspx page, the variable is undefined. What could be the reason, are there any good alternatives?
The site uses managed metadata navigation.