Reputation: 11
I am seeking to use a Wix page as a landing page. I need to pass in an email address as a URL parameter to the page and have it displayed on the page. How can I pass url parameters into a page - and how can I grab that parm in code? Can someone please point me to, or provide and example of this?
Upvotes: 1
Views: 3524
Reputation: 958
Send your email in a parameter like https://[email protected]
Then use Wix Location Query to get the value of the parameter.
import wixLocation from 'wix-location';
$w.onReady(function () {
let query = wixLocation.query['email'];
let email = decodeURIComponent(query); //decode uri encoded values in readable format
console.log(email); //this is your email
});
Upvotes: 2