Loading Session Data into Beacon Bar

Scenario: The objective is to load user metaData and retain it throughout the entire session.

Configuration during server-side rendering:

<script>
  // Ensure BeaconBar.user is initialized
  if (!BeaconBar.user) {
    BeaconBar.user = {};
  }
  
  // Set the sessionData object for user
  BeaconBar.user.sessionData = {
    // Define session data properties here
  };
</script>

On the client side using the API:

// Load session data using BeaconBar API
BeaconBar.loadSessionData({
   // Specify session data properties here
});

Last updated