added heap analytics script
extracted out the code as a config variable for heap analytics