Placing statistics on pages

From TITAN Wiki
Jump to: navigation, search
Basic statistics on TITAN homepage

TITAN General Statistics class lets you easily retrieve basic statistics of your running application instance. You may want to use it for design, marketing, or even diagnostic purposes. Those data is stored in application's cache which means using it doesn't overload your database server.

Available metrics

Among many others, most popular stats are listed below.

  • AppSettings.TotalMembers
  • AppSettings.OnlineUsers
  • AppSettings.TotalCashout
  • AppSettings.TotalMembersRegisteredToday
  • AppSettings.TotalEarned
  • AppSettings.TotalInMainBalance
  • AppSettings.TotalInAdBalance
  • AppSettings.TotalInTrafficBalance
  • AppSettings.TotalViewOfPTCAds
  • AppSettings.TotalAdPackAdsViews
  • AppSettings.ExposuresServedYesterday
  • AppSettings.InvestmentPlatformTotalPaidIn


You can have your statistics in any file containing HTML code. Just place it inside the code render block (<%= %>) like in the example below.

<div> <p>Number of members: <%=AppSettings.TotalMembers %> </p></div>

This will result in something like:

Number of users: 1234

You can perform basic calculations on above data. For instance, if you want to know the average payout per user you can do this:

<%=AppSettings.TotalCashout/AppSettings.TotalMembers %>