Building Custom Analytics Dashboards

Using Dynamic Forms you can quickly and easily build a Custom Analytics Dashboard that will have nearly limitless expandability and suit your personal needs. However, we strongly recommend that you read the Dynamic Forms API as well as take a look at the Dynamic Forms Tutorial before starting.

Since there's no need to over-complicate the full capabilities of Dynamic Forms and Charts in this tutorial, we'll not use any Cloud Code in order to create our Dashboard. For this reason we'll only need to create our Chart templates and Analytics Screen.

In this tutorial we'll create 3 charts:

Note: The Charts are game-dependent and will be unique for every game. For this reason, some of the charts in this tutorial might use requests that do not exist in your configuration. For example, you might not be able to group requests by: Type - equal - DeviceAuthenticationRequest if your game has never made this request. Simply skip these if they are not applicable to you.

New Players Chart

This chart was created in the Charts tab of the Manage>Admin Screens section and we used new_players Short Code:

We then click Test to preview the chart:

The chart preview is generated as well as the GSML code, which you can copy and paste into a Screen using the chart later on.

Total Players Chart

Much like New Players, but here we want to keep track of daily total player logins for the game. For this we need to create a chart with a Short Code of total_players:

We then click Test to preview the chart:

The chart preview is generated as well as the GSML code, which you can copy and paste into a Screen using the chart later on.

Errors Chart

This chart will be used to display a pie chart and a data table of the error responses for some of the Requests we care about. All we do here is create a chart with errors Short Code:

We then click Test to preview the Pie Chart, which will display the visual representation of the error count that has occurred:

Note that the other display settings for this type of chart are disabled.

We then click Test to preview the Data Table, which will display and allow viewing of the actual error responses:

Note: The only difference between these two charts is in how the chart will be accessed by our GSML.

Analytics Screen

The Screen will only act as a container for our charts. It's fairly straightforward:

The GSML in the Analytics Screen:

    <gs-title-block title="Analytics" padding="10" margin="0">

        <gs-row>
            <gs-col width="6">
                <gs-title-block title="New Players" padding="5" margin="0" height="360">
                    <gs-chart chartType='hist' calc='requestCount' annotate='tooltip' chartPeriod='1d' query='new_players'></gs-chart>
                </gs-title-block>
            </gs-col>
            <gs-col width="6">
                <gs-title-block title="Total Players" padding="5" margin="0" height="360">
                    <gs-chart chartType='hist' calc='playerCount' annotate='tooltip' chartPeriod='1d' query='total_players'></gs-chart>
                </gs-title-block>
        </gs-row>
        <br/>

        <gs-row>
            <gs-col width="6">
                <gs-title-block title="Errors" padding="5" margin="0" height="360">
                    <gs-chart chartType='pie' group='_type' calc='requestCount' annotate='legend' query='errors'></gs-chart>
                </gs-title-block>
            </gs-col>
            <gs-col width="6">
                <gs-title-block title="Errors Table" padding="5" margin="0" height="360">
                    <gs-chart chartType='data' pageSize='5' query='errors'></gs-chart>
                </gs-title-block>
            </gs-col>
        </gs-row>
        <br/>

    </gs-title-block>

The final view:

Note: All data shown within these forms is time-limited. Player request data isn't kept forever and it's very likely that when a player has been inactive for a certain amount of time, the above form can appear empty.

Did this page help you? Please enter your feedback below. For questions about using this part of the platform, please contact support here