Skip to content

Commit

Permalink
Do not change custom dimension when the Item is null
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak committed Nov 25, 2024
1 parent 00f4048 commit 8deab9e
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Long, Object> handleDimension = new LinkedHashMap<>();
handleDimension.put(11L, item.getHandle());
matomoRequest.setDimensions(handleDimension);
} catch (MatomoException e) {
log.error(e);
}
Expand Down

0 comments on commit 8deab9e

Please sign in to comment.