Referrals does get complex, and it does depend what you are deeming a “referral”.
A click on the refer button ? (easily spoofed with multiple clicks)
An actual “share” ? (very hard as you don’t get told when someone actually uses, say, the Facebook share dialog). AddToAny / AddThis can help somewhat here.
An actual “referral” (so someone clicking on the shared link) ?
An action based on the referral (so a sign up) ?
Referral technology tends to use cookie tracking rather than link tracking. People click the shared link, a cookie (containing the sharers / channels unique id) is dropped. Then if they happen to go back to page later via search rather than the link and sign up … you fire a tracking pixel, read the cookie and bingo. Well, mostly Bingo, that is how most of the affiliate networks do their tracking and it isn’t all that reliable.
If you want to track clicks on AddtoAny, put the widget in a group, then run an action to add to a count.
If you want to track referral traffic as well, add a parameter to the sharing URL … which could be current users id.
then pull it back in on page load.