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 UUID/userID and send an API call.
It is important that all clients pass the UUID/userID field when they connect to PubNub. Each user should be assigned a unique UUID/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.