Create a record in DB

Is there any way to create a record in DB whenever a user opens a site but does not perform any action on the site?

  Discussion posts and replies are publicly visible