How to fix Memberstack v2 buttons not opening signup modals when clicked?

Post author
Lisa Eshun-Wilson
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

  • Comment author
    A J

    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.

    0
  • Comment author
    Lisa Eshun-Wilson

    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

    0
  • Comment author
    A J

    Hey Lisa Eshun-Wilson,

    Can you add the following script in the Head code of your site settings:

    <!-- Memberstack webflow package --> <script data-memberstack-app="app_cmfs64j5s00jl0wu4h1ee40in" src="https://static.memberstack.com/scripts/v1/memberstack.js" type="text/javascript"></script>

    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:

    <!-- Memberstack v2 (must be in <head>, ideally first) -->

    Test it out with the new script and let me know if it works for you.

    0
  • Comment author
    Chukwudi

    HI Lisa Eshun-Wilson

    I also noticed you have the following code in your login.html:

    <!-- Memberstack v2 (must be in <head>, ideally first) --> <script data-memberstack-app="app_cmfs64j5s00jl0wu4h1ee40in" src="https://static.memberstack.com/scripts/v2/memberstack.js?ts=MS1" onload="console.log('MS v2 onload:', !!window.Memberstack)" ></script>

    Kindly remove that code snippet, and replace it with the code AJ provided. I'd also recommend you make the code available site-wide.

    0
  • Comment author
    Lisa Eshun-Wilson

    It worked!! 🤩🤩🤯🤯

    Thank you guys!!

    0

Please sign in to leave a comment.