Premium plan is required for this feature.
In this article, we will learn how to auto-login a user with pre-filled data from your website. You can auto-fill the name, email, and whether or not to auto-log them in.
Example of how this works:
If a user a logged into your website and hasn’t entered a SweepWidget giveaway yet, you can auto-fill the name/email. You would be pulling this data from the session data on your website and populating the SweepWidget form with it. Furthermore, you can automatically have them enter the giveaway with this name/email combination.
You will need to add 3 parameters to the embed code for your giveaway.
Here’s an example embed code:
You would need to add the following 3 parameters:
data-email-prefill="[email protected]" data-name-prefill="John Doe" data-auto-login-prefill="1"
The values to each of these parameters would be pulled from your session or cookie data. Here’s an example implementation using PHP:
Also, you can set data-auto-login-prefill to either 1 or 0. If it’s set to 1 it will auto-log them in. If it’s set to 0, it won’t.
How to auto-log user in on hosted landing page with URL parameters?
You can also pass the name, email, and whether or not to auto-log a user in by passing specific parameters of the URL address bar on your hosted SweepWidget landing page. You simply need to pass the following 3 parameters:
data-auto-login (use 1 for yes and 0 for no)