Group Statistics Tab
This documentation outlines the structure and features of the Group Statistics Tab used in the BuddyPress-based stats module. It describes the various sections, reports, and charts available to users for analyzing group activity, top contributors, growth, and engagement.
1. Group Activity Levels Report
Description:
The Activity Levels Report provides insights into group activity over a selected period. Users can filter activity data by week or month and view a graphical representation of the group’s activity over time.
Features:
- Filter Options:
WeeklyMonthly
- Date Selection:
Users can select a specific date using the date picker to view data up to the selected date. - Displayed Graph:
A graph is displayed using the<canvas>element, showing the group’s activity trends over time.
2. Top Contributors Report
Description:
The Top Contributors Report highlights the most active contributors in the group based on the number of activities, comments, and likes. This allows group admins to recognize the most engaged members.
Features:
- Data Display:
A table is displayed listing the contributors along with the number of activities, comments, and likes they have generated. - Load More:
If there are more contributors than the default number, developers can implement a “Load More” feature.
Filters Available:
- bp_stats_max_top_contributors:
This filter allows developers to modify the maximum number of contributors displayed by default. The default limit is 10.
3. Group Growth Report
Description:
The Group Growth Report tracks the growth of the group over time by showing the increase in the number of members. This report provides a visual representation of how the group is expanding.
Features:
- Displayed Graph:
The group growth trends are displayed using the<canvas>element, which shows the number of new members joining the group over time.
4. Group Engagement Report
Description:
The Group Engagement Report displays the overall engagement level of group members. This can be helpful in understanding how actively members are participating in group activities.
Features:
- Displayed Graph:
A graph is used to represent engagement metrics such as the number of likes, comments, and posts over time.
Filters Available:
- bp_stats_group_engagement_data_filter:
This filter allows developers to modify the data displayed in the engagement report, giving control over what engagement metrics are considered.
Example Usage of Filters:
Modify Maximum Contributors:
To modify the default number of top contributors displayed in the “Top Contributors Report”, you can use the following filter:
add_filter( 'bp_stats_max_top_contributors', function( $max ) {
return 20; // Set the maximum number of contributors to 20
});
Modify Activity Report Data:
You can customize the data shown in the activity report by hooking into the bp_stats_activity_report_data_filter filter:
add_filter( 'bp_stats_activity_report_data_filter', function( $data ) {
// Customize the activity data
return $data;
});
This documentation provides a comprehensive overview of the Group Statistics Tab and its features, making it easier for developers and users to understand the available reports and customize them to meet specific needs.




