This project is not covered by Drupal’s security advisory policy.

Adds the Vardot Client Hub widget to your Drupal site. Store its key securely with the Key module and choose which roles and themes see it. No theme or code changes needed.

Features:

  • One-step widget setup: adds the Client Hub script to the start of the page body, without editing theme templates.
  • Key stored securely: the widget's data key is managed by the Key module, so it can come from an environment variable or a file instead of being saved in exported configuration.
  • Role visibility: show the widget only to the roles you choose. Common editorial and admin roles are pre-selected on install.
  • Multiple themes: load the widget in the front-end theme, the admin theme, or both.
  • Page exclusions: hide the widget on chosen paths, one per line. You can use * wildcards and <front>, and both the internal path and its alias are checked.
  • Position offset: move the widget up or left, in px or in % of the screen (up to 50%), so it doesn't overlap a chat, cookie banner or back-to-top button in the same corner.
  • On/off toggle: turn the widget off from the settings page and keep your settings.
  • Per-environment kill switch: add $settings['vardot_hub_disabled'] = TRUE; to settings.php to turn the widget off on one environment, such as local or staging, even when it is enabled in exported configuration.
  • Organized settings page: settings are grouped into Connection, Visibility and Position. Role and theme lists collapse when a site has more than 10 of them.
  • Built-in setup help: the settings page and the help page list the setup steps, including the site address to allow for your key in the Client Hub.
  • Cache-safe: the widget never leaks to users, themes or pages it isn't meant for, even with page caching on.

Use it when a site's team works with Vardot through the Client Hub and should reach it directly from the site, while visitors never see it.

Post-Installation

  1. Go to Configuration > System > Keys and add a key holding your Client Hub data key. For production, use the "Environment" or "File" key provider.
  2. Go to Configuration > Web services > Vardot Hub (/admin/config/services/vardot-hub).
  3. Select the key, then adjust the roles and themes if needed, and save.

On install, the module pre-selects the site's default and admin themes and any of the administrator, editor, content_admin and site_admin roles that exist. The widget stays off until a key is selected.

The Client Hub only accepts requests from domains registered for your key. If the browser console shows a CORS error, register the site's domain (including local or staging domains) for that key in the Client Hub.

Additional Requirements

  • Drupal 10.3 or later, or Drupal 11
  • Key
  • A Vardot Client Hub data key

None needed. Key module providers that read from environment variables or files are recommended for keeping keys out of version control.

Similar projects

General-purpose script injectors such as Asset Injector can add any script, but keep the full snippet, including any key, in configuration. Vardot Hub is purpose-built for the Client Hub widget: the key lives in the Key module and the only settings are roles and themes.

Supporting this Module

Development is sponsored by Vardot.

Community Documentation

See the module's README.md for setup steps.

Supporting organizations: 

Project information

Releases