The subscription statistics provide statistics about the count of the subscriptions in the email campaigns module. They can be used to provide information like:
- Total count of subscriptions and canceled subscriptions;
- Total count of subscriptions and canceled subscriptions for the last week or the last month;
- Total count of subscriptions and canceled subscriptions for today;
This topic explains how to obtain these statistics and how to work with them in order to visualize a specific information.
Querying subscriptions statistics
To query the subscriptions statistics, you must get all the subscribers in the email campaigns module and filter them according to the desired criteria. For more information on how to get all the subscribers, see For developers: Query subscribers.
The Native API exposes methods that upon calling automatically calculate one of the following statistics for you:
To obtain these statistics, you must call the respective methods of the NewsletterManager class:
- The count of new subscriptions this month;
- The count of new subscriptions this week;
- The count of new subscriptions today;
- The total count of subscriptions;
- The count of cnaceled subscriptions this month;
- The count of canceled subscriptions this week;
- The count of canceled subscriptions today;