Skip to main content

Prices

An associative memory task with a learning and a recognition phase. Participants are shown item–price pairs and asked to remember them, then tested on which price was paired with each item. Prices are localized to the participant's currency.

Running with or without images​

Study launches (token, callback, or embed=1) are word-only by default: each item is shown as its name plus a price. Add images=1 (or images=true) to show a photograph of the item above the name during the tutorial example and the learning phase. The public GitHub Pages demo (no token / callback / embed) loads photographs automatically; pass images=0 to force word-only. The recognition phase stays word-only in both modes, so the test remains of the item–price association rather than picture recognition.

Photographs are prefetched as data URLs before the session starts, so trial-onset timing is not affected by network latency. If images=1 is set but no photographs can be loaded (missing host, CORS failure, empty directory), the task logs a warning and runs in word-only mode. Trial data include images_enabled so analyses can distinguish the two modes.

The photographs are not redistributed in this repository. Host them privately (same pattern as FNAME-Pairs: an unguessable path on a host you control, with cross-origin GET allowed) and pass the host via stimuli_base_url. Locally, if the gitignored files are present under assessments/prices/assets/prices/images/, ?images=1 works without that parameter. A deploy script at assessments/prices/tools/deploy_stimuli.sh publishes the files to a private-by-obscurity Netlify site.

How the photographs were selected​

Item photographs come from the THINGS database:

Hebart, M. N., Dickter, A. H., Kidder, A., Kwok, W. Y., Corriveau, A., Van Wicklin, C., & Baker, C. I. (2019). THINGS: A database of 1,854 object concepts and 26,170 naturalistic object images. PLOS ONE, 14(10), e0223792. doi:10.1371/journal.pone.0223792

Stoinski, L. M., Perkuhn, J., & Hebart, M. N. (2024). THINGSplus: New norms and metadata for the THINGS database of 1854 object concepts and 26,107 natural object images. Behavior Research Methods, 56(3), 1583–1603. doi:10.3758/s13428-023-02110-8

Each of the 40 pool items (plus the tutorial example, Bananas) is mapped to a THINGS concept. Candidate photographs for that concept were ranked on THINGSplus nameability together with image-level recognizability and memorability; the rank-1 (best-pick) image is the one the task loads. A few items map to a nearby concept rather than an identical label: Aspirin → pill, Lotion → cream, Vegetable Oil → oil, Light Bulb → lightbulb.

That choice followed a source audit of the item pool against four open-licensed emoji families (OpenMoji, Twemoji, Noto Emoji, Fluent Emoji), the THINGSplus CC0 one-per-concept photographs, the THINGS best-picks, and MultiPic line drawings. Emoji coverage was incomplete and some mappings collided (for example Celery and Spinach both mapped to "leafy green"). MultiPic supermarket coverage was thin. THINGS best-picks uniquely covered every pool item with a distinct, nameable photograph, so they were selected.

Example URL commands​

# Plain launch (debug mode: results shown on-screen)
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/

# Suppress the completion screen
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/?show_end_screen=false

# With camera recording
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/?webcam=1

# With eye tracking
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/?webgazer=1

# Customized assessment parameters (values shown are the defaults)
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/?number_of_items=10&learning_duration_ms=3000&show_good_price_question=true

# With item photographs (THINGS best-picks; recognition phase stays word-only)
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/?images=1&stimuli_base_url=<STIMULI_BASE_URL>

# Production: submit results to your server
https://andreifoldes.github.io/m2c2-assessments/assessments/prices/?token=<TOKEN>&callback_url=<CALLBACK_URL>

Session parameters​

Handled by the launch wrapper (results submission and optional sensors), not by the assessment itself.

ParameterTypeDefaultDescription
callback_urlstring—URL to POST results to when the assessment ends.
embedstring—Set to 1 for embedded mode (e.g. an ESMira PWA iframe): on completion, results are posted to the parent window via postMessage instead of an HTTP callback.
imagesstring—Set to 1 or true to show an item photograph above each item during the tutorial example and the learning phase (Prices). The recognition phase stays word-only. If photographs cannot be loaded, the task falls back to word-only mode.
lightstring—Set to 1 or true to enable ambient light sensing (where the browser supports the AmbientLightSensor API). Participants see a consent prompt; lux readings are recorded during the task and exported at session end.
pidstring—Optional participant identifier. Echoed verbatim into the results: top-level pid next to token in the callback POST, inside data, and in the embed-mode postMessage. Useful when the callback endpoint does not mint per-participant tokens, or to link multi-session designs (e.g. FNAME-Pairs learning vs. delayed) from the URL alone.
recognition_feedbackstring—Set to 1 or true to color the chosen recognition button green/red by accuracy (Prices). By default the selection is highlighted in a neutral color, giving no accuracy feedback.
show_end_screenstringtrueSet to false or 0 to suppress the green "Assessment Complete" screen after results are submitted. A Telegram WebView closes immediately instead of showing the confirmation.
stimuli_base_urlstringassets/prices/images/Base URL for the item photographs. Only used when images=1. The THINGS images are fair-use research stimuli hosted outside this repository (see Running with or without images).
tokenstring—Authentication token for results submission. When absent (along with callback_url), the assessment runs in debug mode and displays results on-screen instead of submitting them.
tutorialstringtrueSet to false or 0 to skip the tutorial screens (alias for the show_tutorial assessment parameter).
webcamstring—Set to 1 or true to enable optional camera recording. Participants see a consent prompt; if they accept, the front camera records and the video is saved locally to their device at session end.
webgazerstring—Set to 1 or true to enable browser-based eye tracking via WebGazer.js. Participants see a consent prompt, then a 5-point gaze calibration. Gaze coordinates are recorded throughout the task and exported as a CSV file at session end. Can be combined with webcam=1.

Assessment parameters​

Parameters marked URL can be set as URL query parameters; the rest are fixed deployment defaults.

ParameterTypeDefaultURLDescription
number_of_itemsnumber10✅Number of item-price pairs per session
learning_duration_msnumber3000✅Display duration per item in learning phase (ms)
show_good_price_questionbooleantrue✅Show 'Is this a good price?' question during learning phase
show_tutorialbooleantrue✅Show the tutorial before the test
show_imagesbooleanfalse—Show item photographs in the tutorial and learning phases (enabled via the images=1 URL param)
item_imagesstring{}—JSON map of item name to image data URL (set by index.js after image prefetch)
show_recognition_feedbackbooleanfalse—Color the chosen recognition button green/red by accuracy. Off by default: the selection is highlighted neutrally instead
min_price_distance_usdnumber3✅Minimum separation between correct price and distractor, expressed in USD. Automatically converted to the local currency equivalent using approximate exchange rates.
localestringen-GB✅BCP 47 locale tag (e.g. 'en-GB', 'fr-FR'). Set to 'auto' to detect from the browser.
currencystringGBP✅ISO 4217 currency code (e.g. 'GBP', 'EUR'). Set to 'auto' to infer from locale.
excluded_itemsstring""✅Comma-separated item names to exclude from this session. Use for within-day no-repeat rule (Rule 7).
used_item_pricesstring{}✅JSON object mapping item names to arrays of previously used prices. E.g. '{"Almonds":[3.27,5.82],"Cereal":[7.63]}'. Prevents re-presenting the same item-price pair (Rule 8).
show_trials_complete_scenebooleanfalse (site override; package default true)—After the final trial, should a completion scene be shown? Otherwise, the game will immediately end.

Generated from assessments/prices/prices.js and assessments/prices/index.js. Do not edit by hand.