-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analytics services integration #7313
Conversation
Just a comment while passing by: writing JS code in a textarea and having it rendered on the client seems like a potential security vulnerability; I would rather define the custom snippet in the "backend" configuration of the app (e.g. web.xml), which is harder to access. |
@jahow thanks for the review, we'll check if can be moved to |
Configuration moved to |
* Analytics services integration / Send events by protocol * Analytics services integration / Add example config for matomo.
geonetwork/core-geonetwork#7313 Co-authored-by: Jose García <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
Failing test were: ``` 15:47:17,320 [INFO] Results: 15:47:17,320 [INFO] Error: 7,320 [ERROR] Failures: Error: 7,320 [ERROR] AlternateLogoForPdfExportTest.whenGeneratingPdfWithPropertyNotSetSiteLogoIsUsed:114 Status expected:<200> but was:<400> Error: 7,321 [ERROR] AlternateLogoForPdfExportTest.whenGeneratingPdfWithPropertySetPdfLogoIsUsed:74 Status expected:<200> but was:<400> Error: 7,321 [ERROR] AlternateLogoForPdfExportTest.whenNotGeneratingPdfWithPropertySetSiteLogoIsUsed:93 Status expected:<200> but was:<400> Error: 7,321 [ERROR] Errors: Error: 7,321 [ERROR] FormatterApiIntegrationTest.testExec:97 » XPath Exception in extension functio. ```
* Analytics services integration * Analytics services integration - add settings help * Analytics services integration - move configuration to config.properties * Analytics services integration - better name for web analytics service * Analytics improvements (#84) * Analytics services integration / Send events by protocol * Analytics services integration / Add example config for matomo. * Update web/src/main/webResources/WEB-INF/config.properties Co-authored-by: François Prunayre <[email protected]> * Test / Fix bean initialization Failing test were: ``` 15:47:17,320 [INFO] Results: 15:47:17,320 [INFO] Error: 7,320 [ERROR] Failures: Error: 7,320 [ERROR] AlternateLogoForPdfExportTest.whenGeneratingPdfWithPropertyNotSetSiteLogoIsUsed:114 Status expected:<200> but was:<400> Error: 7,321 [ERROR] AlternateLogoForPdfExportTest.whenGeneratingPdfWithPropertySetPdfLogoIsUsed:74 Status expected:<200> but was:<400> Error: 7,321 [ERROR] AlternateLogoForPdfExportTest.whenNotGeneratingPdfWithPropertySetSiteLogoIsUsed:93 Status expected:<200> but was:<400> Error: 7,321 [ERROR] Errors: Error: 7,321 [ERROR] FormatterApiIntegrationTest.testExec:97 » XPath Exception in extension functio. ``` --------- Co-authored-by: François Prunayre <[email protected]> Co-authored-by: Juan Luis Rodríguez Ponce <[email protected]>
This change allows to configure JS snippets to integrate with Matomo or Google Analytics. By default, no analytics service is configured.
An example configuration with Matomo:
Also adds a service to track the links access, currently only implemented for Matomo using Events (https://developer.matomo.org/api-reference/tracking-javascript). Catalogue events are created based on link protocols and allows to track actions on links.
Example of configuration for matomo