Prerequisite: make sure you integrate the Game API and it’s loading correctly before continuing (see Load the API).The Score will only be submitted when the game is running on a Spil Portal. The GameAPI will not be able to submit scores for games that are not running on the Spil Games network.
The GameAPI will is able to handle the Score submission call in any environment, so the game can always try to submit it no matter where it is running even though gameplays outside Spil Network will not be taken into account.
Only implement the below feature, if your game supports high-scores. Add below code at the location in your game source where you normally handle high-scores.