akshays
12 months agoAce
Is there any way to get the user data in Page Head Content in JavaScript?
I want to get user data like roles, username, etc in the Page Head Content ( in the wrapper ) and use the data to integrate an analytics tool. The issue is that this user data is fetchable only using Freemarker and freemarker would not work in the header script. Do we know if therei is a way to fetch all this data in a script tag itself?
I know one way would be to make an AJAX request to an endpoint and getting all the data from the endpoint's response. But, that would mean making an API call on home page load and might not be good for performance.