Getting Username placeholder text from database to javascript

I have a multisite subdomain setup with wpultimo. I added a Freshdesk chat widget code onto ultimo Ads Settings so that all my subsites backend can have chat support from me.
But using this way there is a limitation. When a user send me a chat, i cannot get their name, email etc…

May i know how to get the username, first name, last name and email autocratically from their account? the code i’m using is as below:

<script>
function initFreshChat() {
window.fcWidget.init({
token: “b3e233a0-####-####-####-##########”,
host: “https://wchat.freshchat.com”
});
window.fcWidget.user.setFirstName(“{user_name}”);</div>
<div class=”intercom-block-paragraph e19rsvrm0 intercom-1d3znxz”>}
function initialize(i,t){var e;i.getElementById(t)?initFreshChat():slight_frown:(e=i.createElement(“script”)).id=t,e.async=!0,e.src=”https://wchat.freshchat.com/js/widget.js“,e.onload=initFreshChat,i.head.appendChild(e))}function initiateCall(){initialize(document,”freshchat-js-sdk”)}window.addEventListener?window.addEventListener(“load”,initiateCall,!1):window.attachEvent(“load”,initiateCall,!1);
</script>

Script above is a sample code given by Freshdesk. What they told me is to put text placeholder so that it will grab the details from database.
For example, in subsite woocommerce setting, when i put {user_name}, then this field will be replaced by the account username.
Kindly advise how to achieve the same result on FreshDesk javascript.