Get User Information on Unbounce Landing Pages
- Create an Auth0 account and navigate to the dashboard.
- Go to Applications and click + Create Application. Pick the
Single-Page Applicationoption and go to Settings. Note the Client ID and Domain. Also, add the
callback URLin both Allowed Callback URLs and Allowed Origins (CORS) (it should be your Unbounce page URL. For example:
- Go to Connections > Social and enable the social providers you want to support.
- Add a button (or whatever UI element you consider) that will trigger the login with the provider. Take note of the button ID under Properties > Element Metadata.
Before Body End Tagunder
Placementand add this code. Also make sure to check jQuery as a dependency.
- You need a way to pass the information coming from the social providers to Unbounce. The way you do that is by creating a Form and adding
Hidden fieldsfor each field. In the following example we are using the fields
google-oauth2and for LinkedIn,
Field Name and ID).
Now you will be able to see the information provided by the IdP in the
Leads section of your Unbounce Admin Panel, after the user submits the form.