I'd like to track referral traffic however on some places we can't add URL parameters in order not to be considered as spam.
For example, I post this The Beginner's Guide to DevOps on reddit, how can I track leads who come from there?
Is there any script I can add to the page to capture referrals like google analytics and mixpanel do?
If you are truly banned from using a querystring then just use a path parameter. http://www.example.com/learn/what-is-devops;r or http://example.com/learn/what-is-devops/r can be easily decomposed into path + param. All in how you configure your server. There's nothing special about the querystring in this way.