maccman / abba

A/B testing framework
MIT License
1.35k stars 70 forks source link

Add callback to .complete() #10

Open typpo opened 11 years ago

typpo commented 11 years ago

Add a callback to Abba.complete() that fires when tracking image has loaded.

Use case: you want to record a completion when user clicks something. In many cases (eg. signup or purchase button) this links to a different page, but you don't want to navigate away until the completion was recorded.

maccman commented 11 years ago

The reason I haven't done this in the past is that I think a timeout is much better for situations like this. Yes, you may not record every conversion properly, but it provides a much better user experiences.

In situations where people control the landing page (I think probably the majority), an anchor fragment is much more preferable: https://github.com/maccman/abba#links