Introduction

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.

Integrations

Activity Counters is currently integrated with these Wix apps and features:

Wix Blog

Wix Blog counts blog posts, comments, and likes.

Wix Forum

Wix Forum counts forum posts, comments, likes, and views.

Wix Members Area

Wix Members Area counts followers in both directions (followed by / following).

Access

Third-party developers can

  • read (but not set) public counts from any apps.
  • read and set all counts for their own apps.

Initializing a counter

To create a new counter for a third-party app, use the Set Activity Counters endpoint.

Use cases

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.

  1. Get per-member post numbers for blog or forum app using the Get Activity Counters endpoint.
  2. 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.

  1. Get per-member reaction numbers for blog/forum app using Get Activity Counters endpoint.
  2. Process counts and display in widget.
Was this helpful?
Yes
No

Activity Counter Object

Attributes
memberIdstringformat GUID
Member ID.

appIdstringformat GUID
App ID.

countersArray <Counter>
Counters for this member and this app.
Was this helpful?
Yes
No

PutSet Activity Counters

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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:
Manage Activity Counters
Learn more about permission scopes.
Endpoint
PUT
https://www.wixapis.com/members/v1/activity-counters/{memberId}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetGet Activity Counters

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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:
Read Activity Counters
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/members/v1/activity-counters/{memberId}

Was this helpful?
Yes
No

PostQuery Activity Counters

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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:
Read Activity Counters
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/members/v1/activity-counters/query

Was this helpful?
Yes
No

Activity Counter Updated

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Set activity counter event

This event happens after updating a counter.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.members.v1.activity_counter.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.
Was this helpful?
Yes
No