Using our Javascript Hook API (developers only)

This guide is for the legacy v1 of MemberSpace. For the current v2 API, please visit:

We provide the ability for you to access the currently logged in member so that you can further customize your site.

Common use cases include:

  • Displaying certain elements if a member is logged in.
  • Pre-fill forms with a member's information.
  • Displaying personalized messages to members.

How to get started

Start by placing this code on your website:

  (function() {
    MemberSpace.onReady = MemberSpace.onReady || [];
    MemberSpace.onReady.push(function(args) {
      if (args.member) {
        /* Your custom code goes here */

Make sure this code block is below the required MemberSpace Install Code.

The member object data structure will be as follows:

    id: [integer],
    name: [string],
    firstName: [string],
    lastName: [string],
    email: [string],
    profileImageUrl: [string],
    plans: [array],
    plan_ids: [array],
    failedCard: [boolean],
    customField###1: [string],
    customField###2: [string],
    customField###3: [string]

Property Descriptions


The member's unique identifier.


Simply a string combination of the first and last name of the member.


A string of the member's first name.


A string of the member's last name.


A string of the member's email address.


A url of the member's profile image source.


The plans array is a list of plan names the member is actively subscribed to.


The plan_ids array is a list of plan ids the member is actively subscribed to.


The failedCard boolean indicates if the customer currently has a failed payment.


A string of the member's custom sign up fields.

To find the 4 or 5 digit id for each field, go to your MemberSpace account > click on Customize > click Sign Up Fields > then edit the field you're looking for and copy the digits that appear in the URL (/custom_fields/ ####/edit).

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.