Playtomic Provides Free HTML5 Leaderboards & Analytics

I've had a few people ask me how I implemented online leaderboards in the HTML5 games I have created so far. My ultimate plan is to have user accounts on Ascended Arcade that store leaderboards and persistant user information such as savegames and statistics server-side but until then, I was able to quickly implement Playtomic's HTML5 API for online leaderboards and usage tracking. In Javascript, a username variable exists which is sent to Playtomic's server along with a score object in a score submission. This score object contains the username, score, date, and any custom variables you may have wanted to specify. You can specify whether any particular leaderboard is a 'highest is best' board for high scores or a 'lowest is best' board for things like fastest times. The first thing you need to do is create an account at Playtomic and great a game to give you some ID codes for you game. From your game's HTML page, you must reference the Playtomic Javascript in your <head> section.

From within your game, you can register a view of your game:

Playtomic.Log.View(xxx, "xxxxxxxxxxxxxx", document.location);

Now once a player beats a level, you can submit the score to Playtomic in the form:

Playtomic.Leaderboards.Save(score, table, callback, options);

You can also list leaderboard scores with the following function:

Playtomic.Leaderboards.List(table, callback, options);

You can also do quite a few other things such as have custom metrics to log when various levels are played, beaten, etc to see what your players are doing in your games. This is a great tool for making improving them as you can see when players lose interest. Here's a link to Playtomic's HTML5 API documentation for more information:

Playtomic API HTML5 Documentation