How to load MemberStack asynchronously or exclude it from specific pages in Webflow to improve LCP?
We're using Memberstack v2 on a Webflow site. One of our pages (klarfar.no/last-ned) is a standalone lead magnet landing page where users don't need to log in or access member content. Memberstack.js is loading as a render-blocking script and significantly impacts our LCP score. Is there a way to load Memberstack asynchronously, defer it, or exclude it from specific pages?
Comments
2 comments
Hey Andreas Gorm Tungland,
You could add 'async' attribute to the memberstack script and that could help with the load speed, however that would mean gated content might be accessible until the memberstack script is loaded, so its usually not recommended.
And if you don't have any elements gated on the specific page you mentioned, I am not sure if memberstack script is affecting the LCP score largely.
That being said, if you do want to prevent loading the script on a specific page, a simple script like the following could help you out in that case.
You can place replace the memberstack install script with the above in the site settings custom code and test it out.
Hope this helps.
Thanks AJ! Then at least I'll be able to experiment and see if that's the main reason. Thanks again 🙂
Please sign in to leave a comment.