Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Luzmo Viewer

No security coverage
View on drupal.org

This module allows you to embed Luzmo dashboards into your Drupal site using a custom field. You can configure authentication and choose whether to use remote or local Javascript libraries for displaying the dashboards.

This module intend to add a custom field that allow users to display Luzmo dashboard ID using javascript embed API.

Features

The module allow content editor to embed dashboard.
Dashboard can be displayed using integration key and token but site builder can also use embed tokens to display the dashboards.

Post-Installation

Module settings

Once installed go to /admin/config/system/luzmo-settings and change settings.

You'll need to fill:
- authkey: with your Luzmo API key
- authtoken: with your token API key
- luzmo.js location: define the location of the Luzmo embed library .js file. Default use remote version of the library.
- Luzmo App Server: you can change here the url of the Luzmo app server, default is https://app.luzmo.com/

The Account settings for logged-in or anonymous users allow you define user information required for authorisation.
It is only required if you need to request an authorisation.

Luzmo configuration

Create an integration on Luzmo ( https://app.luzmo.com/integrations ).
Select the dashboard you want to be embedded on drupal.
At the end of the process get the key & token.

You can still add dashboard later, just do not re-generate key and token.

Field creation

After that, create a Luzmo viewer field on your entity.
There is no settings for the form widget.
In the display you can set if formatter need to request an authorisation.

Additional Requirements

The module require Luzmo embed web component. You can use it remotely or localy https://socket.dev/npm/package/@luzmo/embed

If you decide to request an authorization , please make sure that users/suborganisations will have permissions to access the data.

Additional Information

Field cache

When authorisation is request, field use a per user cache with the max-age set to the authorisation inactivity interval time.

How can I alter cache?

Use drupal preprocess to alter cache contexts, ex:


/**
 * Implements hook_preprocess_HOOK().
 */
function hook_preprocess_field(&$variables) {
  // conditions
  foreach ($variables["items"] as &$items) {
    $items['content']["#cache"]["contexts"][] = 'cookies:luzmoFilters';
  }
}

I want to alter authorisation

Module implement a custom hook that allow you alter the authorisation before it's requested.
Example, it can allow to pre-fill dashboard filters.

Module implemant a hook: hook_luzmo_viewer_dashboard_javascript_authorisation_alter that can be called in module or theme.

Example:
I want to alter dashboard filters

/**
 * Alter authorisation settings to add filters based on cookie.
 *
 * {@see hook_luzmo_viewer_dashboard_javascript_authorisation_alter}.
 */
function hook_luzmo_viewer_dashboard_javascript_authorisation_alter(&$authorizationSettings, $dashboard_id) {
  $luzmoFilters = Drupal::request()->cookies->get('luzmoFilters');
  if (!empty($luzmoFilters)) {
    $luzmoFilters = json_decode($luzmoFilters, TRUE);
    foreach ($luzmoFilters as $filter_dashboard_id => $filters) {
      if ($filter_dashboard_id == $dashboard_id) {
        $authorizationSettings['filters'] = $filters;
      }
    }
  }
}

Activity

Total releases
3
First release
Nov 2025
Latest release
3 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.1.1 Stable Apr 9, 2026
1.1.0 Stable Apr 7, 2026
1.0.0 Stable Nov 6, 2025