added event tracking to elements.