Set node to flagged by default
You need to use another flag to identify anonymous visits.
Flag value is always boolean , true or false. So you cannot have a default value to identify whether it's visited by anonymous.


What you can do is use a rule


Check visitor is anonymous 
If yes set a flag called "anonymous_visit" to that particular node
Use above information in your views to display nodes


Above rule sets flag on view of a node, If you want to add flag by default to a content then your rule event should be on node create add xx flag to node...

You can also use flag api with node api hooks to achieve above.. See flag api below example..

Flagging or Unflagging an item
You use the $flag->flag() method to either flag or unflag an item. Example:

&lt;?php
$flag = flag_get_flag('bookmarks') or die('no "bookmarks" flag defined');
// Flag node #456:
$flag-&gt;flag('flag', 456); 
// Unflag node #456:
$flag-&gt;flag('unflag', 456);
?&gt;
The signature of this $this-&gt;flag() method is:

&lt;?php
function flag($action, $content_id, $account = NULL, $skip_permission_check = FALSE)
?&gt;