To insert the Piwik code into your pages, import the style sheet XSLT into your graphic charter (file in web\skins\[NOMDELASKIN]\stylesheets\head.xsl)
<xsl:import href="plugin:web-analytics://stylesheets/piwik.xsl" />
<xsl:import href="plugin:web-analytics://stylesheets/piwik.xsl" />
<xsl:import href="plugin:web-analytics://stylesheets/piwik.xsl" />
Then use the template piwik in the <head>
<html> <head> [...] <xsl:call-template name="piwik"/> </head> <body>...</body> </html>
<html> <head> [...] <xsl:call-template name="piwik"/> </head> <body>...</body> </html>
<html> <head> [...] <xsl:call-template name="piwik"/> </head> <body>...</body> </html>
Piwik provides statistics on the most searched keywords.
Since version 1.1.0 of plugin web-analytics, Ametys supports this feature by sending the keywords searched for through the "texfield" search field to the Piwik server. This search field is the "Keywords" search field used by default in all Ametys search engines.
If you need to track another search field, use the "piwik" template, specifying the search field(s) to be tracked as below:
<xsl:call-template name="piwik"> <xsl:with-param name="keywordFields"> <fields> <field name="textfield"/> <field name="keywords"/> </fields> </xsl:with-param> </xsl:call-template>
<xsl:call-template name="piwik"> <xsl:with-param name="keywordFields"> <fields> <field name="textfield"/> <field name="keywords"/> </fields> </xsl:with-param> </xsl:call-template>
<xsl:call-template name="piwik"> <xsl:with-param name="keywordFields"> <fields> <field name="textfield"/> <field name="keywords"/> </fields> </xsl:with-param> </xsl:call-template>