Adding the Memberstack ID to a URL as a parameter on your Webflow website requires specific steps to capture the ID of the logged-in user and append it to your desired URL.
data-ms-member attribute which can be used to access user-specific information.
```javascript
<script>
MemberStack.onReady.then(function(member) {
if (member.loggedIn) {
var memberID = member["id"];
// Now you can use memberID where needed
}
});
</script>
```
```javascript
<script>
MemberStack.onReady.then(function(member) {
if (member.loggedIn) {
var memberID = member["id"];
// Example action where you append the ID to the URL
var button = document.getElementById("yourButtonId");
button.addEventListener("click", function() {
window.location.href = "https://www.yourwebsite.com/page?memberID=" + memberID;
});
}
});
</script>
```
To append a Memberstack ID of a logged-in user to a URL in Webflow, ensure you have Memberstack integration, retrieve the user's ID using their API, and dynamically modify the URL via JavaScript. This allows you to append the ID as a URL parameter based on user actions.