These sites are dangerous. I just went through the process of setting salary ranges for a number of new hires and the discrepancies between the self-reported sites and the commercial data brokers are fairly large.
As best I can tell, most people reporting their salaries on Glassdoor (for example) are junior people who are either inflating their title/experience, rounding up their salary, or both. Also the higher up you go in titles, the wider the variance. Without information about sample size, it's hard to know if the range for, say, a CTO in Springfield is really $80k-300k or if they just happened to have two people report their salaries (or aspirational salaries).
Self-reported salary sites are simply too easy to game to be reliable. If I wanted to depress salaries in Springfield, I could just submit some carefully designed "employees" to skew the stats. Alternatively, employees appear to already be doing that to try to get salaries raise.
Once you're out of the "junior" part of your career (say 5 years of career maturity, regardless of your title), you tend to know your market value and what your salary trajectory will be (if not, talk to your co-workers about pay - that's how executives all keep their pay high, though they communicate via lawyers, board members, and SEC filings). At that point, you're not going to report to these sites.
Employees and job seekers have ready access to these sites and use the data when negotiating raise. The problem is that HR departments have access to commercial databases compiled from actual pay-stub data. This sets up employees for some awkward conversations when they try to justify their 150% pay increase + company Ferrari because someone on Glassdoor claimed that's what their compensation is.