adjusted analytics code to enable demographics