VTUL / vtechworks

DSpace at Virginia Tech
http://vtechworks.lib.vt.edu
Other
6 stars 8 forks source link

Implement Matomo statistics #776

Closed alawvt closed 1 year ago

alawvt commented 2 years ago

Implement Matomo (formerly Piwik) statistics on VTechWorks.

Related to issue, Implement Matomo statistics for VTechWorks in vtlibans

Possible resources

Hello, does anyone have any experience with using / setting up DSpace with Matomo Analytics instead

Hello Peter,

our computer department provides Matomo and we use it in our DSpace repository, too. For that we implemented a code snippet, that we got from the computer department, in the HTML-Head.

We use XMLUI/Mirage2. The code snippet was added in this section: https://github.com/DSpace/DSpace/blob/dspace-6.3/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl#L143-L323

Kind regards, Paul Münch

We "hacked" our XMLUI to use a local Piwik stats server. See snippet below....

After the generation of the identifiers the repository manager has to perform the following steps:

Download the tracking code for the repository platform. The code is maintained on Github: as a patch for various versions of DSpace (https://github.com/openaire/OpenAIRE-Piwik-DSpace)

alawvt commented 2 years ago

I believe we want to add the script to https://github.com/VTUL/vtechworks/blob/vt_6_x_dev/dspace/modules/xmlui-mirage2/src/main/webapp/themes/vtmirage2/xsl/core/page-structure.xsl, just after the Altmetric script, line 333,

           <!-- Add Altmetric support -->
            <script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'>&#160;</script>
        </head>
    </xsl:template>
alawvt commented 2 years ago

Resolved by PR #778.

alawvt commented 2 years ago

This has been pushed to branch vt_6_x_dev_deploy for testing on vtechworks-dev.

alawvt commented 2 years ago

Added commit 0045d37fc4a8188cd9fee420ef9bb5f307536fdb