How can I provide the user id to a javascript snippet

A client wants to add their own “feedback” tab to a WordPress site I run for them (the type that adds a floating blue tab to the edge of the page), and they need to capture the user ID when the script is used. I’m told that they can pull it from a cookie, but what I’m reading leads me to believe that this isn’t available by default.

Also, many users of the site often log in while at work, using the same company computer or tablet, so the cookie would need to reflect the currently-logged-in user (the site’s only available while logged in).

The script can apparently also pull from the URL or from “a unique page variable”.

Thanks!

Read more here:: How can I provide the user id to a javascript snippet

Leave a Reply

Your email address will not be published. Required fields are marked *