Board gaming apps and websites can provide an easy way to post results of completed plays to Board Game Stats. This way the player doesn’t have to copy the play details manually. Show the button if BG Stats is installed (see bottom of the page how to check that).

Suggested button to use:

When tapping the link, if the user has BG Stats (version 3.3.2 or higher) installed on their iOS or Android device, the app will automatically open and show the import dialog. In this dialog the games and players can be matched to existing entries in the app, after which the play is saved.

The app will automatically suggest matches, based on the provided game’s BGG id (if any), name, and player names. Matches made by the user are saved for the next import, so each match only has to be done once. The location is set to the Board gaming app or website providing the link.

If the user is authenticated with their BGG account in BG Stats and has Auto-post enabled, the play will be posted to their BGG account after import.

The link is a simple request URL with this format:<data>

Alternatively, bgstats://<data> works as well.

On Android, users might need to enable ‘Open supported links’ in the ‘Open by default’ settings available in the App info.

<data> is an url-encoded json-string with this format:

  "board": "", 
  "durationMin": 36, 
  "game": {
    "bggId": 132531, 
    "highestWins": true, 
    "name": "Roll for the Galaxy",
    "noPoints": false, 
    "sourceGameId": "21df231"
  "playDate": "2020-10-23 19:16:58", 
  "players": [
      "startPlayer": true, 
      "name": "Eerko", 
      "rank": 1, 
      "role": "", 
      "score": 47.3, 
      "sourcePlayerId": "23432", 
      "winner": true
      "startPlayer": false, 
      "name": "Suzan", 
      "rank": 2, 
      "role": "", 
      "score": 37.3, 
      "sourcePlayerId": "23433", 
      "winner": false
  "sourceName": "App name", 
  "sourcePlayId": "2222427"

Description of elements:

sourceName: the name for your app or website, required
sourcePlayId: your unique id for the play, required
playDate: UTC ending date and time in format yyyy-MM-dd HH:mm:ss, required
durationMin: play duration in minutes, optional
board: the board or variant selected for this play, optional
location: name of the play location, optional; sourceName is used if omitted (3.15+)
game: details of the played game, required
name: the name of the played game, required
sourceGameId: your id for the game, required (used for re-matching)
bggId: BGG id for the game, recommended but optional
highestWins: boolean, determines if a higher or lower score is better
noPoints: boolean, determines if only win/loss is registered and no scores
players: array of players and their scores, required
name: name of a player, required
sourcePlayerId: your unique id for the player, required
startPlayer: boolean, determines if this is the starting player
winner: boolean, determines if this player is a winner
score: integer or decimal (with . as decimal point) score for this player, optional
rank: ranking for this player in this play, starting at 1 (best ranked), optional
role: role for this player in this play, optional

Example complete request URL:

Example iOS (Swift) code to post the play from an app (this doesn’t open a browser first, but opens the app directly) below:

if let appURL = URL(string: requestString) { { success in
        if success {
            print("The URL was delivered successfully.")
        } else {
            print("The URL failed to open.")
} else {
    print("Invalid URL specified.")

Example Android (Kotlin) code to post the play from an app (the user will have to choose the first time whether to open this link in BG Stats or in a browser) below:

try {
    val openUrlIntent = Intent(Intent.ACTION_VIEW, Uri.parse(requestString))
} catch (e: ActivityNotFoundException) {
    Log.d("BGStats", "No application can handle this request.")

Checking if BG Stats is installed

From a website it can’t be determined if a specific app is installed, other than trying to open the app (by linking to bgstats://… and trying to catch the error). It might be preferable to have the user enable the Post to BG Stats button in their settings.

On iOS (Swift) you can check if BG Stats is installed by calling canOpenURL:

func isBGStatsInstalled() -> Bool {
    if let appURL = URL(string: "") {
        return UIApplication.shared.canOpenURL(appURL)
    } else {
        return false

On Android (Kotlin) you can check if BG Stats is installed as follows:

fun isBGStatsInstalled(): Boolean {
    val openUrlIntent = Intent(Intent.ACTION_VIEW, Uri.parse(""))
    val resolvedActivities = requireActivity().packageManager.queryIntentActivities(openUrlIntent, 0)
    return resolvedActivities.any {
        "nl.eerko.boardgamestats" == it.activityInfo.packageName

Starting a new Play in BG Stats

You can launch BG Stats with the New Play screen by calling one of:

To preselect the game to play, provide the bggId of the game as such:

If the game doesn’t exist yet, it will be added to the app, if it can be found on BGG. This is available on iOS, and on Android from version 3.19.1 onward.

To preselect the location to play, provide the name of the location as such: