EZ Likes
EZ Likes is a lightweight Drupal module that automatically attaches a Share action button to any node page using Layout Builder for its display. It tracks per-visitor engagement in the database without any page reloads, and provides administrators with a built-in analytics report showing share counts per node, exportable to CSV. No contributed module dependencies are required beyond Drupal core.
Features
EZ Likes injects a compact action bar at the bottom of every full-view-mode node page that uses Layout Builder.
Visitors can:
- Share a node — copies the canonical page URL to the clipboard with a toast notification. It falls back to a textarea copy method on older browsers.
Share interactions are tracked and deduplicated so administrators can see how often content is being shared.
This module is useful for:
- News sites, knowledge bases, or editorial platforms that need lightweight content engagement metrics without a full third-party analytics integration.
- Intranet or community portals where user sharing helps surface popular content.
- Any Layout Builder–driven site that needs a simple, self-hosted sharing system with no external service dependency.
Unique features include:
- Zero contributed-module dependencies — works with Drupal core alone.
- Data is never destroyed on uninstall — tables are renamed to a preserved backup and automatically restored on reinstall.
- Per-path inclusion and exclusion rules with wildcard support let you control exactly which pages show the buttons.
- A configurable button color with automatic dark, tint, and shadow variants computed at render time.
- Full accessibility with
aria-labelandaria-liveregions on all interactive elements. - A built-in admin report with sortable columns, content-type and title filters, per-node event detail popups, and one-click CSV export.
Post-Installation
After enabling the module with drush en ez_likes -y && drush cr or through Admin > Extend, the ez_likes_events database table is created automatically.
The button appears immediately on all full-view-mode node pages whose display uses Layout Builder. No further configuration is required for a default setup.
Optional configuration is available at Admin > Configuration > Content > EZ Likes (/admin/config/content/ez-likes).
- Enabled content types — restrict buttons to specific node types. Leave all unchecked to show them on every type.
- Included pages — force the button onto specific paths, with newline-separated wildcard support.
- Excluded pages — always suppress the button on these paths. This has the highest priority and overrides all other rules.
- Button color — set a hex color code, with tint and shadow variants computed automatically.
- Show Share button — toggle the clipboard-copy Share button on or off.
Visibility logic priority: Excluded pages > Included pages > Content-type allowlist.
To view engagement analytics, go to Admin > Reports > EZ Likes Report (/admin/reports/ez-likes). This requires the access ez likes report permission. The report shows share counts for every node with at least one recorded interaction, and it supports sorting, filtering by content type and title, and CSV export.
Additional Requirements
EZ Likes requires only Drupal core modules:
- node (core)
- layout_builder (core) — button is injected only on displays that use Layout Builder.
- user (core)
- system (core)
No contributed modules, third-party PHP libraries, or external JavaScript libraries are required.
Supporting This Module
If you find this module useful, the best ways to support it are:
- Report bugs and feature requests in the issue queue.
- Submit patches or merge requests for open issues.
- Write a case study or post about how you use it so other site builders can learn from real-world usage.
Connect with Grazitti Interactive