Skip to main content

Profile widget

The Profile Widget provides users with an overview of their gamification programme. While usually embedded in the Header Widget, it can also be rendered as a standalone element in any HTML container.

Below are screenshots of the widget in action:

Profile missions tab showing available missions Profile widget showing the missions tab with available missions

Profile missions tool tip with additional information Tool tip showing additional mission information on hover

Profile achievements tab displaying user achievements Profile widget showing the achievements tab

Profile levels tab showing progression Profile widget showing the levels tab with user progression

Profile gifts tab with available gifts Profile widget showing the gifts tab

Profile coupons tab with available coupons Profile widget showing the coupons tab

Profile summary tab with overall statistics Profile widget showing the summary tab with overall statistics

Implementation

To render the Profile Widget, add a call to the Mambo profile() function in the mamboCallbacks() array. The example below shows the function call with all available options. None of these options are required, so you could simply use: Mambo('.selector').profile().

JavaScript

Configuration options

Each option found in the code above is explained in detail below. None of these options are required.

Basic display options

OptionDescriptionDefault ValueSample Value
hasPictureDetermines whether the user's pictureUrl should be used to display the profile picture in the widget.truefalse
hasProfileLinkControls whether the user's name should be a link to their profile page. The link will be taken from the user's profileUrl property. See the User APIs for more information.falsetrue
hideOnErrorHides the widget if there is an error retrieving the user's data from the server. When set to true, the widget will only be shown after successfully retrieving user data, meaning no "Loading..." message will be displayed during data fetching.falsetrue
uuidOverrideAllows you to override the default UUID initialised on startup with a custom UUID. This enables User A to view User B's profile information when navigating to User B's profile page.N/Aunique_user_id
OptionDescriptionDefault ValueSample Value
hasEarnPointsControls whether the "How do I earn Points?" link is displayed. It is highly recommended to leave this option enabled.truefalse
earnPointsUrlProvides an alternative behaviour for the "How do I earn Points?" link. By default, this link opens a popup window showing all available behaviours the user can perform. If earnPointsUrl is set, the link will instead open the specified URL.N/Ahttp://site.com/user
pointOpts.showDetermines whether points should be displayed in the profile.truefalse
pointOpts.imgControls whether images associated with points should be displayed. These images can be uploaded through the Administration Panel.truefalse
pointOpts.abbrControls whether points should be displayed using abbreviated units of measure. When false, the full unit of measure is used.truefalse
pointOpts.excludeSpecifies which points should not be displayed. Takes an array of point IDs, which can be found in the Administration Panel when editing a specific point.null['pointId']
pointOpts.includeSpecifies which points should be displayed. Takes an array of point IDs, which can be found in the Administration Panel when editing a specific point. When both include and exclude are specified, the include list takes precedence.null['pointId']

Gifting options

OptionDescriptionDefault ValueSample Value
hasGiftingControls whether the Gifting link is displayed. When clicked, this link opens the Gift Widget popup, allowing users to recognise each other with badges and/or points.truefalse
giftOptsAllows customisation of the Gift Widget that appears when the Gifting link is clicked. For full details, refer to the Gift Widget documentation.N/AN/A

Tab display options

OptionDescriptionDefault ValueSample Value
tabs.hasKPIsControls visibility of the KPIs tab.truefalse
tabs.hasMissionsControls visibility of the Missions tab.truefalse
tabs.hasLevelsControls visibility of the Levels tab.truefalse
tabs.hasAchievementsControls visibility of the Achievements tab.truefalse
tabs.hasGiftsControls visibility of the Gifts tab.truefalse
tabs.hasCouponsControls visibility of the Coupons tab.truefalse
tabs.hasSummaryControls visibility of the Summary tab.truefalse
tabs.selectedSpecifies which tab should be selected when the Profile Widget is first rendered. Valid values include: kpis, missions, achievements, levels, coupons, and summary. For custom tag-based tabs, use the tab ID (tags joined by underscore, e.g., hr_dept_hr_group).kpisachievements
tabs.customAllows creation of custom tabs based on tags. The example shows how to add tabs for 'Marketing' and 'HR' rewards.null[{title:'Marketing',tags:['marketing']},{title:'HR',tags:['hr']}]

KPI display options

OptionDescriptionDefault ValueSample Value
tabs.kpis.labelAllows you to override the default tab name for KPIs.KPIsPerformance
tabs.kpis.filters.dailyControls whether daily filtering is available for KPIs.truefalse
tabs.kpis.filters.weeklyControls whether weekly filtering is available for KPIs.truefalse
tabs.kpis.filters.monthlyControls whether monthly filtering is available for KPIs.truefalse
tabs.kpis.filters.quarterlyControls whether quarterly filtering is available for KPIs.truefalse
tabs.kpis.filters.yearlyControls whether yearly filtering is available for KPIs.truefalse
tabs.kpis.filters.selectedSpecifies which time period filter is selected by default. Note that user selections are stored as preferences.monthlyweekly
tabs.kpis.filters.presentOnlyDetermines if users can select any time frame or only the present time frame. When false, users can select specific past dates. When true, options are based on today's date (Today, This Week, This Month, etc.)falsetrue

Image size options

OptionDescriptionDefault ValueSample Value
imgOpts.picSizeControls the size of the user's profile picture displayed on the left side of the Profile Widget. Valid values: small, medium, large.mediumsmall
imgOpts.badgeSizeControls the size of badges (excluding KPIs) in the Profile Widget. Valid values: small, medium, large.smallmedium