Set node to flagged by default I'm using flags on my site as a way of filtering content through views, when a user views a certain node content type, I have a rule setup which resets the value of my flag and sets it against that user for that node, the views will reference this information and change their output accordingly. 

The problem I have at the moment is what happens when anonymous users enter the site for the first time, they have no flag set, and thus none of the views show anything, until they travel to one of these special nodes.

What I'm looking for is: is it possible to set a flag to a default value, so that everyone has this node tagged until it gets changed?
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;