
Security News
GitHub Actions Supply Chain Attack Puts Thousands of Projects at Risk
A compromised GitHub Action exposed secrets in CI/CD logs, putting thousands of projects at risk and forcing developers to urgently secure their workflows.
@eeacms/volto-matomo
Advanced tools
Volto add-on that integrates Matomo with Volto sites. At this moment there is a very basic integration that just pings Matomo on each router location change.
To configure it, either set the following variables:
settings.matomoSiteId
(if not available it uses: 1
)settings.matomoUrlBase
(if not available it uses: https://matomo.eea.europa.eu/
)or RAZZLE_MATOMO_SITE_ID
and RAZZLE_MATOMO_URL
environment variables.
With version 4.0.0+, you have the possibility to use a second matomo in parallel:
settings.matomoSecondSiteId
(if not available it uses: 1
)settings.matomoSecondUrlBase
(if not available it uses: https://matomo.eea.europa.eu/
)or RAZZLE_MATOMO_SECOND_SITE_ID
and RAZZLE_MATOMO_SECOND_URL
environment variables.
There are four exports in utils.js
(which can be imported from volto-matomo/utils
, including from other Volto addons):
trackPageView({ href, ...options }) : void
- takes an object with href
and other options and sends to Matomo a page view track;trackEvent(options) : void
- takes an options
object parameter and sends to Matomo an event track.trackSiteSearch(options) : void
- takes an options
object parameter and sends to Matomo an site search track.pushInstruction(name, ...args): void
- takes a name and an arbitrary number of parameters, and pushes them to Matomo.Note that the Matomo instance is behind the scenes lazy-loaded and cached.
The default behavior of volto-matomo is a call to trackPageView
in utils.js
, with the href
and documentTitle
options, on every URL change as recorded by the AppExtras
component in Volto. The href
is taken from props.content['@id']
received by the MatomoAppExtra.jsx
component. The utils.js
file exposes just a part of the Matomo React API. If you wish to extend it or to understand it better, this link might be helpful.
git clone https://github.com/eea/volto-matomo.git
cd volto-matomo
make
make start
Go to http://localhost:3000
Make sure you have a Plone backend up-and-running at http://localhost:8080/Plone
docker compose up backend
Start Volto frontend
If you already have a volto project, just update package.json
:
"addons": [
"@eeacms/volto-matomo"
],
"dependencies": {
"@eeacms/volto-matomo": "*"
}
If not, create one:
npm install -g yo @plone/generator-volto
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-matomo
cd my-volto-project
Install new add-ons and restart Volto:
yarn
yarn start
Go to http://localhost:3000
Happy editing!
See RELEASE.md.
See DEVELOP.md.
The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.
See LICENSE.md for details.
5.0.0 - 22 April 2024
04e3030
]d4702ba
]6545c6f
]007ed2a
]FAQs
volto-matomo: Volto add-on
We found that @eeacms/volto-matomo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A compromised GitHub Action exposed secrets in CI/CD logs, putting thousands of projects at risk and forcing developers to urgently secure their workflows.
Research
Security News
A malicious Maven package typosquatting a popular library is secretly stealing OAuth credentials on the 15th of each month, putting Java developers at risk.
Security News
Socket and Seal Security collaborate to fix a critical npm overrides bug, resolving a three-year security issue in the JavaScript ecosystem's most popular package manager.