I want to find out and list the pages that never get visited by anonymous users. Google Analytics just shows pages that are visited at least once.

How can I configure views to create a kind of flag for "visited" or the like?



You may want to use the Flag, Rules and Views modules, as further detailed below ...

Step 1

Enable the Flag module, and create a global flag which you label something like "Visited by an anonymous user".

That way, later on, any node that is NOT flagged by this flag, is one of the nodes that your question is about.

Step 2

Enable the Rules module, and create a custom rule that looks like so:

  • Rules Event: Content is viewed.
  • Rules Condition: Current user has role "anonymous".
  • Rules Action(s): Flag the node being viewed (using the flag from Step 1).

Step 3

Enable the Views module, and create a view of all nodes that are NOT flagged. Those are the nodes that have not been visited at least once by an anonymous user.

Step 4

After you complete (implement) the previous steps, the (Views) results you get are correct as of the date you completed the previous steps. If you do have some type of historical (logging) information available about anonymous users visiting nodes, it would be a matter of using that information to also "flag" those nodes, so that your (Views) results would become more accurate/complete. And if you can make that info available in the format of some view, you could use the Views Bulk Operations (VBO) module, combined with another custom rule to also flag those nodes.

  • 1
    Thanks, this is at least a way to go in future. Great idea! I'll check this out asap. – Volker Aug 9 '17 at 15:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.