What data can I get from a user?

Asked

Viewed 189 times

3

I am creating a Landing page that aims to capture as much information as possible from users who can become future customers

So far I can get the location by geolocation in javascript (if the user allows) or by the IP on the server

I’ve heard of a google API that lets you retrieve user information if it’s logged in to your account, I searched but couldn’t find it, someone knows it?

What other information I can get from the user?

  • Why too wide, the person who wants to close the question could explain the reason? How can I improve? Note, it is not necessary to show how to get the data (but a north would help), only if it is possible to get, if you have any questions I will ask other questions for each one

  • Sopt is not a forum. It is a question and answer site and the question has to be asked in order to get a canonical answer and not an opinion. The shortest answer to your answer is: you will get only what the user allows.

  • 1

    @Williamjohnadamtrindade understand that you will hardly get a user’s information without their authorization, but what is this information? I believe that’s a valid question

  • Guilherme, you would like to know what data are allowed to capture on a Landing page or what data can be captured beyond the typed fields?

  • @Gabrielcarvalho what data can be captured in addition to the typed fields, for example, the location I mentioned and the basic data mentioned in the answer

2 answers

2


From the user itself there is not much to obtain, since the browser does not store user information. Who guada information are the sites, in cookies, but we already know that we cannot read from other websites (domains).

Therefore, we remain some information of the user’s navigation, which exist in the DOM, in objects window and navigator for example:

Navigator.appname: browser name (application using to navigate); Navigator.appVersion: details of user environment versions (operating system and browser), example:

5.0 (Windows NT 6.3; Win64; x64) Applewebkit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36

Navigator.Geolocation: returns the user’s geolocation (if allowed) through browsing, which you have already discovered.
Navigator.Platform: browser platform (operating system).
Navigator.language: language used in browser, example: pt-BR;
window screen.: screen size

Among others. More specific information about the user (name, email, etc.), only what he informed on some site or service and that can be shared. There are Apis for this and with the due consent of the user you can get this data. Here are some examples of most common services:

Facebook API and SDK API Facebook
Google API
Twitter API

  • The answer is old, but it is still valid to stick to the fact that it is possible to obtain cookies and sessions from websites. As long as the site stores the information and the browser processes, this becomes possible, including is widely used in Phishings.

2

Being very direct, if you use authentication via Oauth2 you have access to basic user profile information logged in (with the appropriate permissions), such as:

  • Basicprofile.getId()
  • Basicprofile.getName()
  • Basicprofile.getGivenName()
  • Basicprofile.getFamilyName()
  • Basicprofile.getImageUrl()
  • Basicprofile.getEmail()

For this information I took for basis the documentation concerning the client for Javascript.

I recommend a reading in the guides available by blog of google developers.

  • 1

    it’s actually not very logical to use an authentication on a Landing page.

  • I agree, I just showed you one of the ways to get data after the user is logged in to an account google, does not necessarily apply a Landing page, but can be useful in some way for him, since this type of information can not be obtained only by the user access to Landing page.

  • yes, but the doubt was to capture the data of a page Landing, and not any solution using Oauth

Browser other questions tagged

You are not signed in. Login or sign up in order to post.