XMLSerializer() - converting a DOM element into a String


I trying to track which elements a user clicks on.
For this I’m converting the event target into a string and saving this string in a collection.

To convert the targeted element into a string I’m using XMLSerializer().

The problem is that older browsers do not support this.

Do you guys know of any other method to convert a DOM element into a string?

my code:

event(e, t)

   var s = new XMLSerializer();
   var target = s.serializeToString(e.target); // convert to String
   UserTracks.insert({user: Meteor.userId(), registered: true, route: route, target: target});