<div id="page_content_inner">
  <h2 *ngIf="piwik" class="heading_b uk-margin-bottom">Usage Statistics Configuration & Software Details for {{piwik.repositoryName}}</h2>

  <!-- TOP HELP CONTENT -->
  <help-content #topHelperContent [position]="'top'"
                [ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
  </help-content>

  <div class="uk-grid">

    <!-- LEFT HELP CONTENT -->
    <aside-help-content #leftHelperContent [position]="'left'"
                        [ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
    </aside-help-content>

    <!-- MIDDLE -->
    <div class=" uk-width-expand@m">

      <div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div>
      <div *ngIf="piwik">

        <div class="md-card">
          <div class="md-card-content large-padding">
            <div class="uk-article">

              <p>
                OpenAIRE’s usage statistic service uses the <i>Matomo Open Source Analytics platform</i> (matomo.org) to track usage activity. When <i>metrics</i>
                are enabled for a repository, two unique identifiers are generated - a matomo-ID that associates the repository with its usage events in Matomo
                and an authentication-ID that allows to track usage activity on the Matomo platform. Metadata views and item downloads are tracked and automatically sent to Matomo. Statistics are generated using the COUNTER Code of practice directives.
              </p>
              <p>
                OpenAIRE's usage statistics service tracking code exploits Matomo’s API. In order to make the tracking of usage events from repositories more robust, it was necessary to implement repository platform specific patches and plugins starting with DSpace and EPrints. The code is maintained on Github:
              </p>
              <ul>
                <li>as a patch for various versions of DSpace
                  (<a target="_blank" href="https://github.com/openaire/OpenAIRE-Piwik-DSpace">https://github.com/openaire/OpenAIRE-Piwik-DSpace</a>)</li>
                <li>as an Eprints plugin for version 3
                  (<a target="_blank" href="https://github.com/openaire/EPrints-OAPiwik">https://github.com/openaire/EPrints-OAPiwik</a>)</li>
                <li>as a python script for all other cases
                  (<a target="_blank" href="https://github.com/openaire/Generic-Matomo-Tracker">https://github.com/openaire/Generic-Matomo-Tracker</a>)</li>
              </ul>
              <p>
                To configure your repository to allow tracking in Matomo platform, please change the configuration files with the following parameters and values, generated for your site:
              </p>
              <dl class="uk-description-list">
                <dt>MatomoID</dt>
                <dd>{{ piwik.siteId }}</dd>
                <dt>AuthenticationToken</dt>
                <dd>{{ piwik.authenticationToken }}</dd>
              </dl>
              <p>
                Details for the configuration files are given in the README of the tracking code.
              </p>
              <div class="uk-alert uk-alert-info">
                <strong>NOTE</strong>
                - You will be informed by e-mail that the installation of the tracking code has been validated and when the usage statistics will be available.
              </div>

            </div>
          </div>
        </div>

      </div>

    </div>

    <!-- RIGHT HELP CONTENT -->
    <aside-help-content #rightHelperContent [position]="'right'"
                        [ngClass]="rightHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
    </aside-help-content>

  </div>

  <!-- BOTTOM HELP CONTENT -->
  <help-content #bottomHelperContent [position]="'bottom'"
                [ngClass]="bottomHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
  </help-content>

</div>

