How to display a member's current plan name in the dashboard using Memberstack data attributes? Answered
Are we able to display the users plan name yet? Ie: 'Your Plan - {displays current plan name}'
Our member dashboard ideally would include this so the user can immediately see which plan level they're on. Help center had a post 9 months ago suggesting - data-ms-member='membership.name'. But that doesn't seem to work.
Comments
3 comments
by default this wouldnt work because members can have more than one plan - that being said, if your setup is such that members will only have one plan at a time, you can probably do this with javascript - just look at the plan connections in the local storage and then display it π
Even if they do have multiple plans, this would be possible. I might make a Memberscript for this soon π
Tyler Bell Is plan information (like name, price, etc.) available in the frontend now?
Last time I checked it was not available.
Ryan Fleming I canβt find that help center article π€ Do you have a link handy?
Duncan Hamra https://support.memberstack.com/hc/en-us/articles/4408627868699-How-can-I-show-a-members-current-membership-name-and-price-
I worked once on a use case where I needed to send the planId for analytics purposes. In that particular case, there were few planIds that were not shared, I mean, the user either had to always be on planA, planB, or planC, among other planIds for other reasons. I call them mainPlanIds.
If this is your case, where you're handling the main plan ids using Memberstack logic, you can use this snippet. Replacing only the elements inside mainPlanIds array and yourElem selector (let's say the element that you want to show the plan title) π
This code will execute whenever you include it. You could test it out using your dev console first.
Β
Please sign in to leave a comment.