How to fix Memberstack v2 buttons not opening signup modals when clicked?
Hey everyone! đź‘‹ I could use a little help debugging my Memberstack setup.
Â
I’ve added the Memberstack v2 script to my site's login page (login.html) and set up my buttons with attributes like this:
Â
<a href="#" data-ms-plan:add="pln_free-plan-pqjp04f9">Create a Free Account</a><a href="#" data-ms-price:add="prc_premium-monthly-plan-cklp04n5">Subscribe Monthly</a><a href="#" data-ms-price:add="prc_premium-annual--felk04yk">Subscribe Annually</a>And I also tried this (full code block):<!-- Memberstack (v2) --><script data-memberstack-app="app_cmfs64j5s00jl0wu4h1ee40in" src="https://static.memberstack.com/scripts/v2/memberstack.js"></script><!-- Free (plan) --><a class="btn btn-pill btn-dark btn-wide"  href="#"  data-ms-action="plan:add"  data-ms-plan:add="pln_free-plan-pqjp04f9"> CREATE A FREE ACCOUNT</a><!-- Monthly (price) --><a class="btn btn-pill btn-dark btn-wide"  href="#"  data-ms-action="price:add"  data-ms-price:add="prc_premium-monthly-plan-cklp04n5"> SUBSCRIBE NOW | MONTHLY PLAN FOR $16.99</a><!-- Annual (price) --><a class="btn btn-pill btn-dark btn-wide"  href="#"  data-ms-action="price:add"  data-ms-price:add="prc_premium-annual--felk04yk"> SUBSCRIBE NOW | ANNUAL PLAN FOR $169.99</a>
Â
When I click them, nothing happens — i.e., no modal opens (Memberstack signup/checkout modal).In the browser console I see logs like (DevTools -> Elements on my live page via Inspect):
Â
ms_plan cart found: pln_free-plan-pqjp04f9price-add foundplan-add foundPlan Without ActionPrice Without Action
Â
Things I’ve checked:
- The script is in my <head>
- The IDs are exact (copy-pasted from dashboard)
- Buttons render correctly
- Test Mode is active
But still no modal opens.👉 Do I need to add anything else to the script, or click “Install & Publish” for each plan/price in the dashboard for these attributes to work?
Â
Any pointers would be amazing🙏 !! Thank you guys!!
Comments
5 comments
Hey Lisa Eshun-Wilson,
Can you add the custom attribute data-ms-modal="signup" to your links where you have added the Plan attributes. Having both those attributes should trigger a signup modal.
In case, you want to trigger login modals, then you could add the custom attribute data-ms-modal="login" instead.
Hope this helps.
In case, you are still facing any blocker, you could share your site link to troubleshoot this in a better way.
Thank you!
Okay, so I still running into some issues. I’m setting up Memberstack v2 on my custom HTML site (not Webflow) and I added the following code to my login.html page of the site I am building (yogawithlisa.ai). Full code attached. But when I test in the browser, the script doesn’t seem to load. In Inspect -> Dev Tools -> Console, I see:
Uncaught ReferenceError: memberstack is not defined
at <anonymous>:1:1
Any insights you can provide would be amazing, thank you! Is there something I need to do on the dashboard (like allow my domain https://www.yogawithlisa.ai) before the script will initialize?
https://memberstack.slack.com/files/U02VA9M30H4/F09GX54P6VD/login.html
Hey Lisa Eshun-Wilson,
Can you add the following script in the Head code of your site settings:
Remove the install code that you have enabled already on the site header code. i.e. the script code that you have below the following comment:
Test it out with the new script and let me know if it works for you.
HI Lisa Eshun-Wilson
I also noticed you have the following code in your login.html:
Kindly remove that code snippet, and replace it with the code AJ provided. I'd also recommend you make the code available site-wide.
It worked!! 🤩🤩🤯🤯
Thank you guys!!
Please sign in to leave a comment.