ShvetsGroup

 

Captions

RSS Our blog, keeping you up-to-date on our latest news.

 

Website user activity

0 comments

Website user activity

activities.pngIn recent years social networks have become one of the fastest growing areas of site building, aiming to give more people a platform for communication. The number of website users increases, and it’s getting harder to keep track of the changes they make. We’re gonna talk about special modules for convenient monitoring of website’s or user activity.

The purpose of these modules is to track user actions and display them in a convenient form. The more actions the module is able to record the better. Another important indicator is the integration with other modules and a developed API.

The logic of all of these modules is identical. We track the needed hook and record the event in our database table. All these modules work in conjunction with Views, so the output of the results is straightforward – a standard form is created which we later can theme in our module or theme.

Activity

The relevant 6.x-2.x module branch (6.x-1.x is no longer supported and no upgrades are possible for to 2.x branch). Depends on the Token and Trigger modules. Activity submodule comes with the module package and is used to comment any recorded action.

Ready integrations with other modules:

  • Comment, Node, User — implemented within the module;
  • Flag, Organic groups — implemented in these modules.

The module allows recording such user actions:

Comment Triggers:

  • insert: After saving a new comment
  • update: After updating comment

Nodeapi Triggers:

  • delete: After removal of the material
  • insert: After creating the material
  • update: After updating the material
  • view: When a registered user is viewing the material

User Triggers:

  • insert: After user registration
  • update: After updating user account
  • login: After logging into account
  • logout: After logging out of the account
  • view: When viewing user profile

Flag Triggers:

  • flag: When the contents is tagged
  • unflag: When deleting content tags

OG Triggers:

  • user insert: When user joins the group
  • user update: When user changes subscriptions to the groups
  • user delete: User has deleted subscriptions to the groups
  • user approve: Users was accepted to a group
  • user deny: User participation in the group was denied
  • user request: User has requested participation in the group
  • admin new: Member was appointed the administrator of the group

The module has a quality code and API, there is a description of implemented hooks and documentation for its usage. As an example, consider ready-made implementations for module integration. The module allows flexible configuration of access rights to the activity registration and viewing.

Also the modules include internationalization, and therefore all actions are easily implemented in the necessary website language.

Data is stored in 4 tables:

  • activity - all activity events
  • activity_targets - connection between a message, a language and an event.
  • activity_messages - messages
  • activity_access - connection between the events and modules enabling events.

Heartbeat

This is a rather powerful module including additional 10 submodules: Flag heartbeat, friendlist activity, Heartbeat comments, Heartbeat displays, Heartbeat example module, Heartbeat rules, Heartbeat test helper, Heartbeat views, organic group activity, Shouts. This set includes integration with other modules, testing and example module.

Integration with modules: comment, node, user, flag, OG, system, taxonomy, flag_friend, friendlist, User relationships, displays the results through Views, associated with the Rule module.

This is an advanced module recording almost any event. For example, you can use the admin pages to implement the checking of the percentage of profile completeness and display a corresponding message: profile created; profile completeness is 30%, profile complete, or check how the required fields are filled and more.
All data is stored in the tables:

  • heartbeat_activity - table of activity reports, every message is saved in all of the enabled website languages at once;
  • heartbeat_tags – tags for module messages;
  • heartbeat_mt – connection of tags and messages;
  • heartbeat_translations – connection of translation tables and activity;
  • heartbeat_messages - table of messages for the events.

Multi-language support is enabled and messages are recorded in several languages at once. Unfortunately, the module itself is not translated into Russian and Ukrainian languages, only 10% of the translation is available, but this problem is easily solved. Despite the integration with a large number of modules, there is a powerful and flexible API with necessary developer documentation and the module already supports Drupal 7.x.

Message

Despite the fact that the developers wrote on the module’s page that it is similar to activity and made a list of differences, these differences are in fact much more significant, some of them being very negative. During the configuration the “i18nstrings_update() function not found” error occurred in i18 module, as it turned out, this function is added in the latest i18versions, so an update is necessary before you start working with the module.

Then, we have a video documentation showing how to configure the module with the UI submodule, but the newer versions no longer support this submodule, and the module itself is the API and the available submodules include Message example and Message follow.

According to drupal.org statistics about 20 people are using this module. The integration options consist of flag connection. The module also works in conjunction with i18, Views, ctools, rule.

Messages are stored in the tables:

  • message - message templates;
  • message_instance - messages;
  • message_realm - the scope of the message (user, node, organic group).

There’s an example of the module use with API for the developer, almost no documentation is available.

Summary

From the specified modules, only the first 2 can be taken into consideration, the message is a bit raw and it lacks developer and community support (with no accompanying documentation it won’t be receiving it anytime soon).

The APIs of the first two modules are similar and can be used to record any user or website’s activity.
According to the statistics the activity module has about 2000 fans against 1000 fans of heartbeat, although it is likely due to its first appearance in Drupal 5.x branch.

If we compare the usability and functionality of the admin area, the heartbeat module is a sequence higher, however in terms of all other parameters these two modules are very close.

Got anything to add?