I am adding some custom Mixpanel tracking to our discourse implementation.
Currently, I am using Discourse.PageTracker.current() to add an on(“click”) listener on user click through. This is great and I can identify when a category or topic is loaded. However, is there a way I can grab the topic/category model data from the loaded ajax request. In other words, Can I call something like Discourse.model to get a object of the Topic Name and Author?
I am only using js injection via admin > customize > CSS/HTML. So I wont be doing anything from the back end. I could use jQuery to grab the data that is produces on the page. However, I would prefer something less hacky if possible.