Getting Member Information - SSR

In Server Side Rendering scenarios where you have access to the whole DOM, you can subscribe to our custom events before the widget even starts to load. In this case there is no risk of missing the initial event(s).

const handleReady = ({ detail }) => {
  // Your code

document.addEventListener('MemberSpace.ready', handleReady);

const handleMemberInfo = ({ detail }) => {
  // Your code

document.addEventListener('', handleMemberInfo);

//MS install code ... Please see the relevant section
var MemberSpace = window.MemberSpace || {subdomain: "YOUR_SUBDOMAIN"};
  var s = d.createElement("script");
  s.src = "";
  var e = d.getElementsByTagName("script")[0];

Please check out the Install Code section also.

Last updated