📖
Empirica v1 Docs
  • Introduction
  • Getting Started
    • Setup
      • Windows WSL Instructions
    • Creating your experiment
    • Running your experiment
    • Updating your experiment
  • Guides
    • Tutorial: Your First Experiment
      • Part 1: Getting Started
      • Part 2: Configuring the Experiment
      • Part 3: Adding Social Information and New Factors
      • Part 4: Adding Chats
      • Part 5: Adding Bots
    • The Settings File
      • Specifying Login Details
      • Setting player ids via URL queries
      • Connecting Locally to MongoDB
    • The Admin Panel
    • Special Empirica Elements (and how to modify them)
    • Deploying Your Experiment
      • Database
      • Hosting
    • Managing the Data
    • Using Custom Collections
  • Conceptual Overview
    • Structure
    • Game Life Cycle
      • Customising when players submit stages
    • Concepts
    • Randomization & Batches
    • API
  • FAQ
    • I need help!
    • The Processes and Elements of an Empirica Experiment
    • Managing Players and Games
  • Community Demos
    • Guess The Correlation
    • Random Dot Motion
    • Room Assignment
  • Tips & Tricks
    • Helpful Linux Commands
    • Code Editors
  • Links
    • Empirica website
    • Twitter
    • GitHub
Powered by GitBook
On this page

Was this helpful?

  1. Guides
  2. The Settings File

Setting player ids via URL queries

You can have the player's id set automatically based on a URL query (e.g., MID or PROLIFIC_PID). This will skip the section at the start of the game where players put in their id.

In the public section of your settings file, add this sort of code:

"public": { 
    "playerIdParam": "playerIdKey",
    "playerIdParamExclusive": false 
}

Where "playerIdParam" sets the name of the URL query parameter after which you set the player's id. For example, a fake app with these settings, I could set the player id directly in the URL https://myfakeapp.meteorapp.com/?playerIdKey=3333.

If "playerIdParamExclusive" is set to true , then players can only ever participate if their id is set by the "playerIdParam" (i.e., they cannot set their id in the NewPlayer page), but if it is set to false, then players can join both by setting their id at the NewPlayer page (if there is no query in their URL) and by having their id in the URL query set by the "playerIdParam".

PreviousSpecifying Login DetailsNextConnecting Locally to MongoDB

Last updated 3 years ago

Was this helpful?