Get user_id for Javascript Function

I want to pull the currently logged in user’s User_id to populate a variable for a custom javascript function I’m running on a webpage. Is there a simple way to do this? I have seen/read the documentation around implementing the Intercom code, but it always references hard-coded user info, and I need to dynamically pull the info and can’t find the syntax to do so.
Thanks in advance for any help you can provide!

Welcome to the Forum!

I’d recommend checking out our developer documents which include an example of some syntax you can use in order to populate those variables dynamically. I’ll include a link to that particular setup here :point_down:

Andrew,
Thanks for the response. I’ve read that page (a few times now) and in every example, there is hard-coded user information in place. Perhaps I just missed it, but where do you see how to dynamically pull a user’s id?