Is there any way to track the flag/unflagging of a node/user without the Heartbeat module? Or a way to track all user/node interaction to use it after for statistics?


Yes there is a way ... using a combination of these (commonly used) modules:

Long story short:

  1. Create a "Message Type" that you'll use for creating some type of custom logging (for the events you're asking about).
  2. Use the Rules module to capture the events, with rules actions to create appropriate messages (= records in your custom log).
  3. Use the Views module to browse the messages that got created.

For a variation of your question, where a similar technique can be used, refer to my answer to "Is there a way to send emails when someone logs in?".

PS: this answer applies to D7 ...

| improve this answer | |
  • It works thanks ! Can I use the replacement pattern created in message in views or can i just display the rendered result ? – Yassin Siouda Aug 3 '17 at 12:30
  • In my case a user with the role ("team member") flags a node created by normal user I want to display "@team member_id flagged @node_id created by @user_id" maybe later i would like to add profile pics of both user/team member or the email or any information in the view about them is this possible ? – Yassin Siouda Aug 3 '17 at 12:48
  • 1
    @YassinSiouda I'm not aware of using those "replacement tokens" in a View also. Though you shoud know that the Message module comes with 2 types of tokens: "Dynamic" tokens, and "Single use" tokens (more info on them in the Message "readme.txt file). – Pierre.Vriens Aug 3 '17 at 12:49
  • About your comment with "team_member, etc": that should be (actually "is") straight forward to do. How about you post a new question (with a link to this question if you want). I'd be happy to then also answer that question (with details about the Rule you'd need to make that work. Let me know (extra comment here) when you created such new question). – Pierre.Vriens Aug 3 '17 at 12:52
  • I tried to explain it here – Yassin Siouda Aug 3 '17 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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