Skip to content

Analytics

Pro. This feature requires WB Member Blog Pro. The free plugin must be installed and active first. See the Pro index for every Pro module.

Tracks post views and traffic sources, and gives members a dashboard for their own content. On by default.

Settings live at Member Blog > Analytics. The tab also shows total views, views today, this week and this month for the whole site.

Setting Default Description
Enable Analytics Yes Track views and traffic sources for member posts
Allowed Roles All roles Which roles can open the analytics dashboard. Leave empty to allow everyone.
Track Daily Views Yes Store view counts per day, which is what the trend charts are drawn from
Track Traffic Sources Yes Classify where a view came from (search, social, direct, referral)
Retention 90 days How long daily history is kept. Older rows are cleaned up on a schedule.

Allowed Roles is enforced. Before 4.0.0 a code path could fall open and hand analytics to every role regardless of this setting.

Members see their own analytics through the Author Dashboard, or through the shortcode:

[bp-member-blog-analytics]
[bp-member-blog-analytics days="7"]
Attribute Default Description
user_id The logged-in member Whose analytics to show
days 30 How many days of history to chart

A member who is not logged in is asked to log in. A member whose role is not in Allowed Roles is told they do not have permission.

Analytics can be exported to CSV from the dashboard.

The export is now written as proper CSV. Before 4.0.0 it was escaped as if it were HTML, which broke the columns for any post with a quotation mark in its title, and let a post title beginning with =, +, - or @ be evaluated as a formula by Excel or Google Sheets when the export was opened. Post titles are written by members, so that was a real risk on any site with an untrusted member base.

Author totals are correct at any size. Before 4.0.0 the totals were computed from an author’s most recent 500 posts only, so a member with 600 published posts was shown a total that silently omitted 100 of them.