#Nr. 3 - Speichern von Mitglieder-JSON in den lokalen Speicher beim Laden der Seite

Erstellen eines Localstorage-Objekts, das den JSON-Code des angemeldeten Mitglieds beim Laden der Seite enthält

Video Tutorial

Loom
tutorial.mov

Watch the video for step-by-step implementation instructions

The Code

12 lines
Paste this into Webflow
<!-- 💙 MEMBERSCRIPT #3 v0.1 💙 SAVE JSON TO LOCALSTORAGE ON PAGE LOAD -->
<script>
document.addEventListener("DOMContentLoaded", async function() {
  const memberstack = window.$memberstackDom;
  
  // Retrieve the current member JSON data
  const member = await memberstack.getMemberJSON();

  // Save the member JSON as a local storage item
  localStorage.setItem("memberJSON", JSON.stringify(member));
});
</script>

Script Info

Versionv0.1
PublishedNov 11, 2025
Last UpdatedNov 11, 2025

Need Help?

Join our Slack community for support, questions, and script requests.

Join Slack Community
Back to All Scripts

Related Scripts

More scripts in JSON