We'll create fresh WordPress site with Append User ID installed. You have 20 minutes to test the plugin after that site we'll be deleted.
Adds the current logged in user ID to a specified string
[user_link url="https://domain.com/link"]A link[/user_link]
Will output the following HTML
<a href="https://domain.com/link?user_id=1">A link<a/>