ublo-lib 1.25.26 → 1.25.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,12 +20,17 @@ export default function CrossSellingEditor({
20
20
  cmsMode
21
21
  } = useUbloContext();
22
22
  const sendPlausibleEvent = e => {
23
- const link = e.target.closest("a");
23
+ const container = e.target.closest("data-custom-offers");
24
+ const sections = Array.from(container.querySelectorAll("section"));
25
+ const section = e.target.closest("section");
26
+ const link = section.querySelector("a");
24
27
  if (link) {
25
28
  const selector = ".tunnel-offer__title, [data-title]";
26
29
  const offer = link.querySelector(selector)?.textContent || "";
30
+ const position = sections.indexOf(section) + 1;
27
31
  Plausible.sendGoal("Cart Cross Selling Offer: Click", {
28
- Clicked: offer
32
+ Clicked: offer,
33
+ "Clicked & Position": `${offer} | ${position}`
29
34
  });
30
35
  }
31
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.25.26",
3
+ "version": "1.25.27",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.3",
6
6
  "leaflet": "^1.9.1",