Issue #1498794 by Rob Carriere, Taran2l: Analytics variable needs to be global, moved outside of callback function.