From 9626de6f918c497e7b892fed1d0f43c39fe126cf Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Mon, 13 Jan 2025 20:42:52 +0000 Subject: [PATCH] Add xpath helper to valueGetters in analytics --- src/nationalarchives/lib/analytics-helpers.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nationalarchives/lib/analytics-helpers.mjs b/src/nationalarchives/lib/analytics-helpers.mjs index 56952e16..93008fa2 100644 --- a/src/nationalarchives/lib/analytics-helpers.mjs +++ b/src/nationalarchives/lib/analytics-helpers.mjs @@ -68,6 +68,7 @@ const valueGetters = { return expanded.toString() === "true" ? "opened" : "closed"; }, closestHeading: ($el) => getClosestHeading($el), + xpath: ($el) => getXPathTo($el.target), }; export { getXPathTo, getClosestHeading, valueGetters };