This project is not covered by Drupal’s security advisory policy.
Are you looking for adding a block to your entity either the user, node or any custom entity that is showing the users viewed this entity?
like in LinkedIn where you can see the people viewed your profile or the people saw a specific product?
If so, then this module will help you accomplish that.
Features
- Advanced saving option: just like the first yellow block in the picture, the module will keep a record of every visit to the visited entity and will create a new record for the same user visiting the profile but with a different visiting time.
- Basic saving option: just like second green block in the pictures, will save only the last visit of the visitor, so every visitor will have one record only with the latest updated visiting time.
- Mail notification: Notify users with mails when someone views their profile (customizable by the role), starting from alpha6 this feature will be there. you can specify which role to receive a mail that someone has visited their profile, you can also customize the subject and the body send to them. Please note that this will require a mailing module like SMTP or a SwiftMailer.
Installation
you can either use the zipped file below or use composer :
composer require 'drupal/entity_visitors-entity_visitors'. Note: the module name is different than the short name since it was reserved in the previous module that was having a typo in the short name.
Blocks Out of the box
This module comes with three blocks out of the box:
- Users viewed profile block: it shows the users who viewed a specific profile. (hence you should place this block in /users/{user} pages only)
- Users viewed page block: it shows the users who viewed a specific page. (see the configurations section below to customize it for your specific content type.)
- Users viewed node block: this is a generic block that shows the users who viewed any type of node without specifying the bundle/content type.
Timestampable - Users viewed profile block: the user who visited this profile a long with the timestamp.
Configurations
- Exclude Roles: to exclude a role from being counted like the administrators, go to
admin/config/entity_visitors/configand exclude whatever role you want. The excluded roles visits to entities won't be counted. -
Save the last visits only: if you check this, you get the basic option of saving only the last visits,
otherwise you will have a new record for each visiting time. - Send mail to the person who was visited: this enables the mailing functionality and asks you to add the template, subject and which user roles to be notified.
Upcoming Features
- Specify what entities to be tracked, this can be a very good optimization.
- hide the visitors' data, just tell the user that someone has viewed your profile and you need to upgrade to see who viewed it (customizable message and by role).
Contributors
Donation
any donations are welcome on Paypal
Project information
- Project categories: Content editing experience, Integrations
- Ecosystem: Profile visit, User Visits
4 sites report using this module
- Created by ahmed-ayman on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.


