updated GA logic for rails 4
updated GA logic for rails 4