The Activity Counters service allows site owners and third-party developers to keep track of Wix site members' activity. See "Integrations" below for Wix App activities that are already counted.
The service allows public and private counters:
- Public counters can be read by any site member.
- Private counters can only be accessed by the site member who owns the counter.
The Activity Counters API gives third-party developers access to the counters on a site at a per-member, per-app level.
Counters are only activated when a site member actually performs the activity the counter tracks.
This means that the query and list endpoints for this API may return a large number of results, for sites with many members.
Activity Counters is currently integrated with these Wix apps and features:
Wix Blog counts blog posts, comments, and likes.
Wix Forum counts forum posts, comments, likes, and views.
Wix Members Area counts followers in both directions (followed by / following).
Third-party developers can
- read (but not set) public counts from any apps.
- read and set all counts for their own apps.
To create a new counter for a third-party app, use the Set Activity Counters endpoint.
Most active writer widget. A developer wants to add a "most active writer" widget to their home page, based on the number of posts each member creates.
- Get per-member post numbers for blog or forum app using the Get Activity Counters endpoint.
- Process counts and display in widget.
Most influential member widget. A developer wants to add a "most influential members" widget to his community, based on how many likes and comments each member's posts get.
- Get per-member reaction numbers for blog/forum app using Get Activity Counters endpoint.
- Process counts and display in widget.
Sets activity counters for a requested site member.
If a counter does not yet exist, it will be created.
Counters are set under a custom key, which is an ID for the counter, and is unique per app.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Returns activity counters for a requested site member. A third party can read all the public counters, set by any apps. However, third parties can only read their own private counters, not those from others' apps.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Returns up to 100 activity counters for the provided filter and paging.
Service will return only counters that are marked as public, or private counters from apps created by the requesting third party.
Supported fields for filtering:
- memberId
Supported operations: Comparison:
- $eq
- $ne
- $in Logical:
- $and
- $not
- $or
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Set activity counter event
This event happens after updating a counter.