There are a variety of methods that companies use to collect user data. Some are more obvious than others. For example, surveys are an easily visible form of accumulating data, often appearing as a profile sign up or pop up window. These questionnaires are either normally associated with user demographic as they create a new account or a user's feelings and attitudes toward the product in the form of feedback. All of which require user participation as it could not easily be assumed based on user interactions with the content. These are some survey examples:
By following mouse clicks and movement, companies can understand what features of an application are more popular and predict a user's next move. Certain sites are even able to continue tracking user activity beyond itself through the use of third-party tracking. This is when a website allows another company to track its user. This company could be used by other websites and thus, user activity is shared across multiple websites to create a more holistic data profile for that user. This is how advertisers are able to display targeted ads.
Although it may seem that websites and apps collect user information through feedback and sign up forms, there are many more hidden methods such as mouse tracking and third-party tracking that do the bulk of the data collection as it is able to receive heaps of dynamic data to predict patterns and behaviors.
Source:
Federal Trade Commission