You'd have to use a "is attacked" trigger.
Store the life of the unit into a variable.
Add "unit takes damage" to another trigger.
Store the units life into another variable in the takes damage trigger.
Minus the second variable from the first;
You have the damage taken.
This is somewhat unreliable however as the unit can take more damage between "being attacked" and taking the damage (ie. if the attacking unit is ranged) .
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.