A Matomo plugin that allows administrators to customize the destination URL of the Matomo logo through the Admin Dashboard.
By default, clicking on the Matomo logo in the top-left corner navigates to the current Matomo installation homepage. This plugin provides the flexibility to redirect users to any custom URL when they click on the logo, directly configurable from the Matomo administration panel.
- Custom Logo URL: Configure any URL as the destination for the Matomo logo click
- New Tab Option: Choose whether the link opens in the current window or a new tab
- Admin Interface: Easy-to-use configuration panel in the Matomo admin dashboard
- Real-time Updates: Changes are applied immediately for all users
- URL Validation: Built-in validation ensures only valid URLs are accepted
- Secure Implementation: Uses JSON encoding and proper XSS prevention measures
- Matomo >= 5.0.0
- PHP >= 7.3.5
- Administrator access to configure the plugin
- Go to Administration → Marketplace
- Search for "CustomizeLogoUrl"
- Click Install and follow the instructions
- Activate the plugin
- Download the plugin files
- Extract the plugin to your Matomo
plugins/directory - The plugin folder should be named
CustomizeLogoUrl - Activate the plugin through Administration → Plugins
- Navigate to Administration → System → General Settings
- Scroll down to the CustomizeLogoUrl section
- Configure the following options:
- Logo Destination URL: Enter the URL where users should be redirected when clicking the logo
- Open in New Tab: Check this option if you want the link to open in a new window/tab
- Click Save to apply changes
| Setting | Description | Default |
|---|---|---|
| Logo Destination URL | The URL to navigate to when clicking the Matomo logo | Current Matomo installation URL |
| Open in New Tab | Whether to open the link in a new window/tab | false |
🔒 Security: This plugin implements proper security measures including XSS prevention and input validation to ensure safe operation.
The plugin works by:
- Loading user configuration from the Matomo settings system using
SystemSettings - Safely injecting JavaScript configuration using
json_encode()to prevent XSS - Modifying the logo link behavior through DOM manipulation
- Preserving the original link for reference
- Applying the new URL and target attributes as configured
- SystemSettings.php: Manages plugin configuration with validation
- Controller.php: Provides API endpoint for configuration retrieval
- CustomizeLogoUrl.php: Main plugin class handling events and JavaScript injection
- plugin.js: Client-side JavaScript for logo link modification
This plugin is compatible with all modern web browsers that support:
- JavaScript ES5+
- DOM manipulation
- AJAX requests (jQuery or Fetch API)
For troubleshooting, you can use the browser console to access debugging functions:
// Get current configuration
console.log(CustomizeLogoUrl.getConfig());
// Get logo information
console.log(CustomizeLogoUrl.getLogoInfo());
// Force reapply settings
CustomizeLogoUrl.forceReapply();For support, please contact:
- Email: simone.saturno@innovaway.it
- Issues: GitHub Issues
- Source Code: GitHub Repository
- Author: Simone Saturno
- Company: Innovaway S.p.A.
- Website: https://innovaway.it
Contributions are welcome! Please feel free to submit a Pull Request on GitHub.
- Security Enhancement: Implemented
json_encode()for JavaScript configuration injection - Performance: Removed unnecessary debug logging in production
- Improved Defaults: Now uses current Matomo installation URL as default instead of hardcoded URL
- XSS Prevention: Enhanced security measures against cross-site scripting
- Initial release
- Basic logo URL customization
- New tab/window option
- Admin panel integration
- URL validation
This plugin is licensed under GPL v3+. See the GPL License for more details.
logo, navigation, configuration, admin, settings, customization, url, redirect
Note: This plugin modifies the client-side behavior of the Matomo interface and does not affect any analytics data or reporting functionality. All modifications are applied safely with proper security measures.