Most forums operate with a level of user anonymity - usernames are used instead of real names. The social sharing functions of Discourse however show the username in an unecrypted format, such as:
Now if I would share this link using the Discourse’s built in function, using my real-name Facebook or Twitter account, it is very easy for anyone to make the connection in between the real person and my username on the forum.
The usernames in the shared URL should not be in clear text format, but hidden/encrypted in some way. Or is there some other unique identifier you could use?
Also I am not sure where collecting the statistics of the users making shares is all that important. Perhaps more interesting data would be that whose posts are most shared? So the username identifier should be of the post author, not the one doing the sharing.