changed analystics code to exactly match that given by google