It's as simple as:
-------------------------------------------------
var closest = event.target.closest("[data-track]");
if (closest !== null) {
return closest.dataset.track;
}
if (closest.parentElement.dataset.track !== null) {
return closest.parentElement.dataset.track;
}
}
-------------------------------------------------
But this effectively drives our rules. So I know the data element is working...otherwise our rules wouldn't fire. We also pass this value into a Prop for debugging (which also works). And when I try the code itself instead of using the satellite then that also works.
So I know the code works OK. Seemingly the only flaw is the satellite.