Merged
Conversation
- Fix Import-Package to exclude all third-party dependencies (gRPC, Netty, compression libs, etc.) - Add Velocity tools to Import-Package whitelist - Change default metric from ga:visits (GA3) to sessions (GA4) - Bundle all Google Analytics Data API dependencies inside plugin JAR This resolves OSGi wiring errors when deploying to local/Docker dotCMS instances and makes the plugin compatible with Google Analytics 4.
Automatically builds and releases the plugin JAR whenever code is merged to main. Skips releases if the version already exists to avoid duplicates.
- Quick installation and setup instructions - Basic usage example - Link to full integration guide at dotcms.com/integrations/google-analytics - Common metrics reference - Version history and contributing guidelines
- Bug reporting and enhancement request guidelines - Development setup and workflow - Code style and OSGi considerations - Testing checklist - Pull request process - Semantic versioning explanation
Build with Java 21 (matching local development environment) while maintaining Java 11 bytecode compatibility via sourceCompatibility setting.
- Remove issue reporting section (not actively monitored) - Add clear versioning requirement for PRs - Explain GitHub Actions release behavior - Streamline before-you-start section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes OSGi dependency issues and updates the plugin for Google Analytics 4 (GA4) compatibility.
What Changed
Core Fixes
org.apache.velocity.*to Import-Package whitelist to fixNoClassDefFoundError: ToolInfoga:visits(Universal Analytics) tosessions(GA4)Automation & Documentation
Why
The plugin was failing to load in local/Docker dotCMS instances due to OSGi wiring errors. Multiple missing dependencies (brotli4j, zstd, jzlib, ning, etc.) were causing deployment failures. The default metric also caused API errors since
ga:visitsis not valid in GA4.Testing
./gradlew jar$analyticsin Velocitysessionsmetric works as defaultBreaking Changes
None. Existing Velocity code continues to work. The default metric change only affects users who don't explicitly set metrics (best practice is to always set them explicitly anyway).
Related Issues
Resolves OSGi dependency issues reported in local deployments.
Next Steps
After merge, the GitHub Actions workflow will automatically:
v0.4.1