improved ga snippet