Emitting events - analytics

@martynjames 

I added handlers that are called via AJAX calls when the iframe or image is loaded. I would like if someone from the analytics team take a peak at this too see if it works as expected.