From 8deab9ecf5f7b889b94989bea3cdf93c27db0754 Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Mon, 25 Nov 2024 21:13:32 +0100 Subject: [PATCH] Do not change custom dimension when the Item is null --- .../dspace/app/statistics/clarin/ClarinMatomoOAITracker.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/app/statistics/clarin/ClarinMatomoOAITracker.java b/dspace-api/src/main/java/org/dspace/app/statistics/clarin/ClarinMatomoOAITracker.java index 5e0ca5703b52..465aa82f9f7a 100644 --- a/dspace-api/src/main/java/org/dspace/app/statistics/clarin/ClarinMatomoOAITracker.java +++ b/dspace-api/src/main/java/org/dspace/app/statistics/clarin/ClarinMatomoOAITracker.java @@ -57,10 +57,6 @@ protected void preTrack(Context context, MatomoRequest matomoRequest, Item item, log.debug("Logging to site " + matomoRequest.getSiteId()); try { matomoRequest.setPageCustomVariable(new CustomVariable("source", "oai"), 1); - // Add the Item handle into the request as a custom dimension - LinkedHashMap handleDimension = new LinkedHashMap<>(); - handleDimension.put(11L, item.getHandle()); - matomoRequest.setDimensions(handleDimension); } catch (MatomoException e) { log.error(e); }