Creating a statistic
To show how to deal with this scenario, we’re going to take the statistic definition from the Doing More With Statistics page. From this definition, we’re going to see how to add metadata to every row added to the statistic.Adding metadata to each statistic
We want to know if the player has any unauthorized hardware that affects gameplay or any other malicious software that could enhance the player’s performance. The anti-cheat system is capable of getting all of this information. We only need to attach this information for the long shots stat. To perform this action, we’re going to use the UpdateStatistics API. Here we can check the SDK example:Metadata parameter within the StatisticUpdate, which refers
to contextual data that is going to be updated a part from the value itself. Here we can add whatever information that could be meaningful for a developer,
in this case, the anti-cheat data.
With these examples, we’re now equipped to track all relevant information from our top players, enabling game moderators
to make better decisions on who to ban.
Conclusions
In this tutorial, we learned how to do the following operations:- Create a multi-column statistic.
- Add metadata to the statistic.
