BoxLang 🚀 A New JVM Dynamic Language Learn More...
Extension to add functionality for including Matomo (former Piwik) analytics to your website.
Install the extension to your application via either of the methods detailed below (Git submodule / CommandBox + ForgeBox)
From the root of your application, type the following command:
git submodule add https://github.com/madmikede/preside-ext-matomo.git application/extensions/preside-ext-matomo
From the root of your application type the following command:
box install preside-ext-matomo
From the Preside CMS developer console (using the back tick ` key) reload the application:
reload all
Once the files are installed, enable the extension by opening up the Preside CMS developer console and entering:
extension enable preside-ext-matomo
reload all
The extensions need some settings. They can all be set in System > Settings > Matomo
Add the following line below the closing
tag in your layout templates.
#renderViewlet( event="Matomo._matomo" )#
</body>
</html>
You may need the possibility for the user to OptOut from Matomo analytics. In this case you can include an Iframe with one of the two ways:
OptOut-Iframe on every page If you need the OptOut-Iframe on every page you can include it in your layout/view templates wherever you need it:
...
#renderViewlet( event="Matomo._matomo_optout" )#
...
OptOut-Iframe on a specific page If you need the OptOut-Iframe only on a specific page you can add a widget to your main content.
Note: The Iframe is maybe hidden. If this happens, in your browser is already activated the DoNotTrack-Option and the Iframe is automatically hidden by the browser. This is not a bug in the extension.
$
box install preside-ext-matomo