Neither the event nor the element object is internally passed to Data Elements (DE). If you want to be able to reference this stuff in a DE, then you can have the DE return a function, so you can call it like a function and pass it as an argument.
Example:
Data Element Name: getClickedElementText
Custom Code:
return function(ev) {
var ev = ev || {};
var elem = ev.target || {}:
return $(elem).parents('h3').text();
}
Then in your Rule, in a custom code box (e.g. in a condition, or in an action custom code box, not flagged for global scope), you can do this:
var text = _satellite.getVar('getClickedElementText')(event);
Note that since this DE is returning a function, you cannot reference it in a built-in text field in your rule.
If you want to be able to use %dataelement%
in UI text fields, then you have to instead put the code in a code box within the rule box (again, not globally scoped) to set an adhoc DE. For example, in a rule condition custom code box:
var elem = event.target;
var text = $(elem).parents('h3').text();
_satellite.setVar('clickedElementText',text);
And then you can use the %clickedElementText%
syntax in the UI text fields. Note though that since you are creating an adhoc DE on-the-fly like this, it won't show up in the dropdown search hint.