Does anyone use totally generic link tracking whic...
# questions
f
Does anyone use totally generic link tracking which pulls properties from the DOM and why doesn't everyone do this basically? I'm not a front-end dev so I'm just hoping to create a fully expressive user-story. But, like, why wouldn't 99% of mixpanel implementations want something like this:
Copy code
mixpanel.track_links('a', 'link_clicked', function (element) {
  return {
    dom_text: element.text,
    dom_href: element.href,
    dom_href_lang: element.hreflang,
    dom_download: element.download,
    dom_hash: element.hash,
    dom_hostname: element.hostname,
    dom_origin: element.origin,
	dom_pathname: element.pathname,
	dom_protocol: element.protocol,
	dom_rel: element.rel
	// etc including every single property of an Anchor tag except the password
  };
});
Does anyone do a similar thing with track_forms? Can I use track_links on <button> elements? I bet I can't.