Add tracking code to only for anonymous users.

I want to add a tracking code to the html.tpl.php file in Drupal 7. I tried the following code, but it does not work.




How can I add a tracking code? < head > only for users who are not logged in?