You can use the new Memberstack 2.0 front-end API and the following code to pass member data into Acuity.
Launch Acuity from a Button (simple)
Place the following snippet on any page where you want to launch Acuity's external scheduling URL from a button.
(Make sure to replace BaseURL with your own Acuity link.)
<script>
window.$memberstackDom.getCurrentMember()
.then(({ data: member }) => {
if(member) {
let email = member.auth.email
let name = member.customFields["name"]
let baseURL = "https://memberstack.as.me/schedule.php?notembedded=1"
let acuityBtn = document.getElementById("acuity-button")
acuityBtn.href = `${baseURL}&email=${email}&firstName=${name}`;
}
})
</script>
Prefilling Supported Fields w/ Member Data (advanced)
...
let email = member.auth.email
let name = member.customFields["name"]
let phone = member.customFields["phone"]
acuityBtn.href = `${baseURL}&email=${email}&firstName=${name}&phone=${phone}`;
Comments
0 comments
Please sign in to leave a comment.