data attributes are special attributes that are found within the dataset object of an element.
So for example, if you have this link:
<a href="somepage.html" data-id="some id">some page</a>
(with pure javascript) you can get the value like so:
var a = document.querySelector('a');
console.log ( a.dataset.id ); // output: "some id"
Alternatively, you can use the elem.getAttribute() method, like so:
var a = document.querySelector('a');
console.log ( a.getAttribute('data-id') ); // output: "some id"
DTM's percent syntax does not let you do the former; it will only let you reference %this.foo% properties that are direct, top level properties of the element. However, DTM does let you use getAttribute, so you can do this:
%this.getAttribute(data-id)%
Note: Unlike the pure javascript example above, for DTM's percent syntax, you should NOT wrap data-id in quotes.