This page should only be applied if the script assisted migration asks you to skip manual migration skin.20240715.INTRANETCARDS.MatomoStats
From version 1.24.0 of Skin Intranet Cards, Matomo statistics on the number of visits can be displayed on each page.
The display of statistics must be activated in the site parameters, and theurl and Matomo server key must be entered in the application configuration parameters.
Statistics on the number of visits are displayed on the front office only.
Statistics on the number of visits are displayed on all inner pages with the Page or Page 2 columns templates.
If you have overloaded the template XSL <xsl:template name="head"> (file stylesheets/head.xsl)You need to add a call to the "matomo" template to activate the calculation of visit statistics.
<xsl:template name="head"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> [...] <xsl:call-template name="matomo"/> </head> </xsl:template>
A call to the "head-js-matomo" template is required from the "common-script" template. If you have overloaded the "common-script" template, add it.
<xsl:template name="common-script"> [...] <xsl:call-template name="head-js-matomo"/> <xsl:call-template name="custom-script"/> </xsl:template>
Visit statistics are displayed to the right of the breadcrumb trail, by calling the "matomo-stats" template.
If you've overloaded the"main-zone" template of the page and/or page-2-columns template, you'll need to add the call to this template, just above the call to the "bread-crumb" template.
<xsl:template name="main-zone"> [...] <div> <xsl:attribute name="class"> <xsl:text>ametys-main-content-inner</xsl:text> </xsl:attribute> <div class="ametys-main-content-body"> <xsl:call-template name="matomo-stats"/> <xsl:call-template name="bread-crumb"/> [...] </div> </div> </xsl:template>