added a callback que for on device ready. move the order of analytics around some so they would wait on the json to be loaded.