Monthly Active Users (MAUs) are unique users that connect to PubNub at least once in a calendar month. A user is counted if they connect to PubNub with a unique userId and send an API call.
It is important that all clients pass the userId field when they connect to PubNub. Each user should be assigned a unique userId that is either cached on the user's device or stored in a database externally. It should remain constant for the lifetime of a user.
The code below shows how to set the userId when you instantiate the PubNub object a client or server.
const pubnub = new PubNub({ subscribeKey: "mySubscribeKey", //subkey publishKey: "myPublishKey", //pubkey userId: "user-1" //unique userID per user });
For more information please check Users and Devices page.