How does Ghostery know if a company is tracking me?

Ghostery analyzes every network request generated by a web page, and matches the outgoing URL patterns against a proprietary database of known tracker vendors to determine if the user is being tracked and by whom.

Access Ghostery Support