Analytics
The AdminTool's Analytics module is an advanced reporting console which offers a business view over the multiplayer game / multiuser application, providing an insight into user traffic from a demographical, technological and applicative perspective.

Features
The description of the Analytics features is available here.
Metrics
The Analytics reporting console revolves around a number of metrics which mimic the classic website usage metrics (visits, unique visitors, etc) and new metrics specifically designed for multiuser environments.
Metrics are evaluated by SmartFoxServer during its operation, and collected as described under Data collection below. Some metrics are common to all views (demographic, technology, etc) while others are specific to some views.
The following metrics are available; they all refer to the selected time period:
| Metric | Description |
|---|---|
| Contacts | Total number of connections A connection is recorded each time a TCP, WebSocket or HTTP connection is established by a client. |
| Visits | Total number of visits A visit is recorded each time a user performs a successful login. |
| Unique visitors | Number of unduplicated (counted only once) visitors The visitor uniqueness is based on the username and login Zone: the same username used in different Zones is considered to be a different visitor. |
| New visitors | Number of first time visitors A visitor is recorded as 'new' if their username has never been used before in the same Zone, regardless of the selected time period (based on the available data). |
| New visitors' visits | Total number of visits of first time visitors A visit is recorded a 'new' over the time period if the user is recorded as new visitor in that period. |
| Returning visitors | Number of visitors who first visited before the selected time period A visitor is recorded as 'returning' if their username has been used before the selected period in the same Zone (based on the available data). |
| Returning visitors' visits | Total number of visits of returning visitors A visit is recorded as 'return' over the time period if the user is recorded as returning visitor in that period. |
| New visitors % | Percentage of first time visitors over the number of unique visitors |
| Returning visitors % | Percentage of returning visitors over the number of unique visitors |
| New visits % | Percentage of first time visits over the total visits |
| Avg. visit duration | Average duration of a visit The duration of a visit is the difference between the login time and the logout (or disconnection) time. |
| Avg. concurrent users | Average number of concurrent users |
| Peak concurrent users | Maximum number of concurrent users |
| Rooms created | Total number of Rooms created This number includes both static and dynamic Rooms. |
| Avg. Room duration | Average duration of dynamic Rooms The duration of a Room is the elapsed time between its creation and its destruction, based on the removal policy set for the Room. |
| Game Rooms % | Percentage of Game Rooms over the total number of Rooms created A Room is of type Game if the 'isGame' flag is set to true during the Room creation. |
| Room joins | Total number of Room joins |
| Avg. Room joins per user | Average number of Room joins over the number of unique visitors If the Rooms created are mostly Game Rooms, this metric shows the average number of matches played by each unique visitor. |
New and returning visitors
New and returning visitors metrics are meaningful if a login credentials system is in place only; otherwise different users might use the same username in the same Zone, being considered as the same user.
Data collection
Metrics data is collected by SmartFoxServer during its operation and it is saved in its embedded HSQL database. It is also possible to use your own external HSQL database: go to the Database tab of the Server Configurator module to configure it.
In no case data is shared with GotoAndPlay or third party organizations.
Visitors geolocation
In order to provide a demographic view on the server metrics, MaxMind's GeoLite2 Country database is used to identify the clients location by means of their IP address (both IPv4 and IPv6 are supported). The database is in binary format and it is located in the /data folder of SmartFoxServer, filename: GeoLite2-Country.mmdb.
The GeoLite2 database is licensed under the MaxMind GeoLite Commercial Redistribution License. This license allows Analytics customers to update their local database when a new version is made available by MaxMind on their website. Simply download the new .mmdb file and overwrite the existing one. As an alternative, the latest release can be installed by means of the Geolocation DB tab of the Server Configurator module.
User interface
The Analytics interface features a few global controls and a number of tabs corresponding to different data views. Other than the general Overview, showing the main metrics from other views, the following are available:
- Demographics, shows metrics split by geographical origin
- Technology, shows metrics split by client platform
- Application, shows metrics split by SmartFoxServer Zone

The structure of the interface is similar for all views: on a desktop monitor, the main chart is at the top (D), the visitors pie chart/s below it (E), the metrics list at the bottom left (F) and an area for view-specific content is at the bottom right (G).
Main controls
The main Analytics controls are located at the top right corner of the module. They allow to control the data range selection and data loading.
Data range
When using Analytics, the first operation to do is usually to select the data range to be displayed. You can then move from one view to another to look for the needed report.
The Configure data range () button opens a modal panel showing the data range selection controls:

The top dropdown contains a number of predefined intervals to easily access commonly used data ranges: today, yesterday, last week and last month. By default yesterday is selected.
Choosing the custom option enables the From and To fields, allowing the selection of any time interval down to the hour of the day.
Select the Compare checkbox to display more controls. It is now possible to select a secondary interval by shifting back the main one, in order to compare the metrics in different time periods. This modifies the behavior of the visits % chart , the main chart
, the visitors charts
and the metrics list
. Data corresponding to the main range is displayed in blue, while data corresponding to the comparative range uses an orange color.
Click the Set range button to retrieve the data related to the selected time period/s.
Stop
The Stop after next () button can be used to cancel the data retrieval process after setting the range or moving to a different view which requires an update. In fact, depending on the selected time span and data size, the retrieval can take a long time to process, as it requires multiple queries to be executed. So stopping it can be necessary sometimes.
Note that clicking on this button doesn't stop the query which is currently in progress, but prevents the server from executing the next ones within the same data request. So a delay before the Analytics interface is available again after clicking the button can still occur.
When data is not retrieved due to the request cancellation, a warning icon is displayed.
Refresh
The Refresh () button can be used to refresh the view in case the stats retrieval was stopped before completion and some metrics show the warning sign. Analytics will load the missing data.
Reset database
The Reset database () button, as the name suggests, deletes all Analytics data. An additional alert is displayed before proceeding.
Current range
The currently selected data range is displayed in the top right corner of the module, to the left of the main buttons. It shows the start date and end date of the selected time interval; if a custom interval is set and its From hour and/or To hour are different from 0 and 24 respectively, a warning icon is displayed at the right of the range as a reminder.
If the Compare option is active in the range selector (see ), the secondary range is displayed below the main one in a lighter color.
Visits percentage
The tiny pie chart at the top left corner of each view offers an immediate indication of the data subset that the current view is showing, based on the Visits metric. A subset is displayed when a filter is applied to data (for example a country is selected in the Demographic view – see ).
This percentage represents the number of visits for the filtered data with respect to the overall visits for the selected time interval:

If the Compare option is active in the range setup (see ), two pie charts are displayed and the change in percentage of visits between the two intervals is reported:

Click on the button to show detailed information on the actual visits for the currently selected range/s:

Main chart
The main chart shows the detailed behavior of the metric selected in the drop-down menu over the current time range. The data granularity can be set with the radio buttons at the top right: hourly, daily, weekly or monthly aggregation. Depending on the time span, one or more options might be unavailable (for example the hourly option is available if the range is less than or equal to seven days).
If a filter is applied for the current view (see ), a box above the chart shows the selection:

Click the Remove sub-filter () button, if present, to reduce the filter granularity (for example, in the Technology view remove the client version and just keep the client platform) or the Remove filter () button to remove the filter completely.
Visitors charts
All views show a specific pie chart under the main chart which offers an immediate representation of the percentage of new and returning visitors over the total number of visitors in the selected time interval. If range comparison is active, two separate pie charts are displayed.
Other than the two percentages, the total number of visits for the two categories is also displayed.
Metrics list
The list located at the bottom left of each view contains the total values of each metric for the selected time period.
In views other than the Overview, and if the range comparison is not active, in addition to the metric value for the selected period and filter, each item also shows the overall unfiltered value for that period and the percentage with respect to it:

If the range comparison is active instead, each list item shows the change in percentage of the corresponding metric between the two periods and the total values. The percentage is displayed in green if the performance is better in the current period with respect to the previous one and in red otherwise:

For metrics showing the Chart () button to their right, click it to plot the metric's detailed behavior over the time interval in the main chart.
View-specific content
The bottom right section of the interface is specific to each view (except the Overview) and it features the content described below, accessible through the buttons at its top. Please note that even if range comparison is active, this section only shows the main range data.
Demographics
The Demographics tab allows filtering data by geographical origin of visitors. The country names are retrieved by geolocating the IP addresses of the visitors (see Visitors geolocation above).
Five main metrics are available: Visits, Unique visitors, New visitors, New visits % and Average visit duration.
The Location sub-view shows the metrics in tabular form, split by country name, together with the percentage with respect to the overall value. Click on a row to set the filter for the whole tab to the corresponding country.
The Top Countries sub-view shows the top ten countries in descending order for the metric selected in the dedicated dropdown. Click on a bar to set the filter for the whole tab to the corresponding country.
The Map Overlay sub-view shows a world map with countries colored on the basis of their ranking for the metric selected in the dedicated dropdown. Move the mouse over a country to get the metric value and click it to set the filter for the whole tab.
Technology
The Technology tab allows filtering data by client platform and version. These two parameters are based on the values passed to the SmartFox.setClientDetails() method of the client API. If the method is not used, default values are displayed (usually the platform/language identifier only, without version number).
The same metrics of the Demographics tab are available for this tab.
The Client Types sub-view shows the metrics in tabular form, split by client platform and version, together with the percentage with respect to the overall value. Click on the arrow in front of the platform name to expand it and show the existing versions. Click on a row to set the filter for the whole tab to the corresponding platform or version.
The Top Clients sub-view shows the top ten client versions in descending order for the metric selected in the dedicated dropdown. Click on a bar to set the filter for the whole tab to the corresponding client platform; click again on a bar to set the filter to the client version.
Application
The Application tab allows filtering data by SmartFoxServer Zone. The Zone names are saved to the internal database when data is collected, so they may not match the current Zones configured in the server (see the Zone Configurator module) in case old Zones have been removed.
The same metrics of the Demographics tab are available for this tab.
The Server Zones sub-view shows the metrics in tabular form, split by Zone name, together with the percentage with respect to the overall value. Click on a row to set the filter for the whole tab to the corresponding Zone.
The Top Zones sub-view shows the top ten Zones in descending order for the metric selected in the dedicated dropdown. Click on a bar to set the filter for the whole tab to the corresponding Zone.