Class MatomoRequestTrackerIdentifierParamEnricher

java.lang.Object
org.dspace.matomo.factory.MatomoRequestTrackerIdentifierParamEnricher
All Implemented Interfaces:
MatomoRequestDetailsEnricher

public class MatomoRequestTrackerIdentifierParamEnricher extends Object implements MatomoRequestDetailsEnricher
Enricher implementation that extracts and validates a tracker identifier from request parameters and adds it to the Matomo request details.

This enricher looks for a 'trackerId' parameter in the usage event request parameters. If found and the value matches the expected 16-character hexadecimal format, it will be added to the Matomo request details as a visitor identifier.

Author:
Vincenzo Mecca (vins01-4science - vincenzo.mecca at 4science.com)
  • Field Details

  • Constructor Details

    • MatomoRequestTrackerIdentifierParamEnricher

      public MatomoRequestTrackerIdentifierParamEnricher()
  • Method Details

    • enrich

      public MatomoRequestDetails enrich(UsageEvent usageEvent, MatomoRequestDetails matomoRequestDetails)
      Description copied from interface: MatomoRequestDetailsEnricher
      Enriches the provided MatomoRequestDetails with additional parameters based on the UsageEvent.
      Specified by:
      enrich in interface MatomoRequestDetailsEnricher
      Parameters:
      usageEvent - The usage event containing information to enrich the request details
      matomoRequestDetails - The request details object to be enriched with additional parameters
      Returns:
      The enriched MatomoRequestDetails object