Edit in JSFiddle

<head>
    <!-- Include the HTML5 API -->
    <script type="text/javascript" src="//cdn.gameplayer.io/api/js/game.js"></script>
<head>
<body>
    
    <!-- your game code -->
    
    <!-- declare the 'SpilData' object and the app ID property -->
    <!-- Load the HTML5 API -->
    <script type="text/javascript">
    var SpilData = {
        id: '576742227280291016' // You receive this value from Spil Games
    };
        
    GameAPI.loadAPI (function (apiInstance) {
        // The API is ready for use.
        if (window.console && window.console.log) {
            console.log('GameAPI version ' + apiInstance.version + ' loaded!');
        }
    }, SpilData);
    </script>
</body>