You can use the 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
2 comments
Hi! Super lost on this, got the button to re-direct to Acuity log-in but have yet to succeed with prefilled info. I think I'm missing something super basic...
Do I need to assign any attributes to the "acuity-button"? For example, should I create an "Acuity Button" under hosted content & set that up as a Secure Link? Or as HTML?
Thanks!
Angry null Can you share a link to your site? It's difficult to debug/help without it.
Please sign in to leave a comment.