labvanced logoLabVanced
  • Research
    • Publications
    • Researcher Interviews
    • Use Cases
      • Developmental Psychology
      • Linguistics
      • Clinical & Digital Health
      • Educational Psychology
      • Cognitive & Neuro
      • Social & Personality
      • Arts Research
      • Sports & Movement
      • Marketing & Consumer Behavior
      • Economics
      • HCI / UX
      • Commercial / Industry Use
    • Labvanced Blog
    • Services
  • Technology
    • Feature Overview
    • Code-Free Study Building
    • Eye Tracking
    • Mouse Tracking
    • Generative AI Integration
    • Multi User Studies
    • More ...
      • Reaction Time/Precise Timing
      • Text Transcription
      • Heart Rate Detection (rPPG)
      • Emotion Detection
      • Questionnaires/Surveys
      • Experimental Control
      • Data Privacy & Security
      • Desktop App
      • Mobile App
  • Learn
    • Guide
    • Videos
    • Walkthroughs
    • FAQ
    • Release Notes
    • Documents
    • Classroom
  • Experiments
    • Cognitive Tests
    • Sample Studies
    • Public Experiment Library
  • Pricing
    • Licenses
    • Top-Up Recordings
    • Subject Recruitment
    • Study Building
    • Dedicated Support
    • Checkout
  • About
    • About Us
    • Contact
    • Downloads
    • Careers
    • Impressum
    • Disclaimer
    • Privacy & Security
    • Terms & Conditions
    • Third-Party Licenses
  • Appgo to app icon
  • Logingo to app icon
Learn
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
  • Guide
    • GETTING STARTED

      • Task Editor
      • Frames
        • Canvas Frame
        • Page Frame
        • Website Frame
      • Trial Timeline
      • Stimulus Presentation
      • Correctness of Response
      • Objects
      • Events
      • Variables
      • Task Wizard
      • Trial System
      • Experiment Design
        • Creating a Study
        • Data Frame Patterns
        • Multi-user Experiment Design
        • Longitudinal Experiment Design
    • FEATURED TOPICS

      • Randomization & Balance
      • Eye Tracking
        • Presenting Stimuli in an Eye Tracking Task
        • How to Choose Eye Tracking Calibration Settings
        • Setting Up Eye Tracking in a Task
        • Recording and Exporting Gaze Data
        • Using Shapes as Areas of Interest (AOI) for Eye Tracking
        • The Participant Calibration Experience
      • Web Bridge
        • Selecting Website AOIs | Anchor, Adjust, and Verify AOI Tracking
        • Tracking Mouse Behavior on a Website AOI | Web Bridge Guide
      • Questionnaires
      • Desktop App
      • Sample Studies
      • Participant Recruitment
      • API Access
        • REST API
        • Webhook API
        • WebSocket API
      • Other Topics

        • Precise Stimulus Timings
        • Multi User Studies
        • Head Tracking in Labvanced | Guide
    • MAIN APP TABS

      • Overview: Main Tabs
      • Dashboard
      • My Studies
      • Shared Studies
      • My Files
      • Experiment Library
      • My Account
      • License & Services
    • STUDY TABS

      • Overview: Study-Specific Tabs
      • Study Design
        • Tasks
        • Blocks
        • Sessions
        • Groups
      • Task Editor
        • Task Controls
        • The Trial System
        • Frame Types
        • Objects
        • Object Property Tables
        • Variables
        • System Variables Table
        • The Event System
        • Text Editor Functions
        • Eye Tracking Options in the Task Editor
        • Head Tracking in a Task
        • Multi-User Studies
      • Settings
      • Variables
      • Media
      • Texts & Translate
      • Launch & Participate
      • Subject Management
      • Dataview and Export
        • Dataview and Variable & Task Selection (OLD Version)
        • Accessing Recordings (OLD Version)
  • Videos
    • Video Overview
    • Getting Started in Labvanced
    • Creating Tasks
    • Element Videos
    • Events & Variables
    • Advanced Topics
  • Walkthroughs
    • Introduction
    • Stroop Task
    • Lexical Decision Task
    • Posner Gaze Cueing Task
    • Change Blindness Flicker Paradigm
    • Eye-tracking Sample Study
    • Infant Eye-tracking Study
    • Attentional Capture Study with Mouse Tracking
    • Rapid Serial Visual Presentation
    • ChatGPT Study
    • Eye Tracking Demo: SVGs as AOIs
    • Multi-User Demo: Show Subjects' Cursors
    • Gamepad / Joystick Controller- Basic Set Up
    • Desktop App Study with EEG Integration
    • Between-subjects Group Balancing and Variable Setup
    • Building a Multi-user Study
    • Website Frame Eye Tracking Walkthrough
    • Conditional Webcam Eye Tracking
    • Text Segmentation Study Building
  • FAQ
    • Features
    • Support Policy & Guidelines
    • Security & Data Privacy
    • Licensing
    • Precision of Labvanced
    • Programmatic Use & API
    • Using Labvanced Offline
    • Troubleshooting
    • Study Creation Questions
  • Newsletter Archive
  • Documents
  • Classroom

URL_Search_Params

URL_Search_Params is a system variable that holds every parameter present on the URL a participant's session started with, captured automatically as JSON. It exists for every study. Most researchers never need to touch it directly, since Labvanced already reads the parameters it recognizes (crowdsourcing ids, group, session, and so on) into their own dedicated variables.

Purpose

Crowdsourcing platforms and panels each send their own long list of URL parameters. Some are integral to how the integration works, like a participant id, and Labvanced already handles those directly. Others are more like supporting information, useful to record in some cases but without a dedicated variable of their own, such as a targeting criterion or an attempt id. URL_Search_Params is the catch-all for that second group: the entire set of parameters is captured automatically the moment the session starts, with nothing to configure, so a new integration just works.

The idea behind it is simplicity: rather than needing a dedicated variable for every parameter a platform might ever send, one variable holds all of them together. This keeps a new integration working without extra setup, and gives you a single place to check if a study ever needs a value nothing else already tracks.

The values themselves come from the crowdsourcing provider, not from Labvanced. Besample's tc, for instance, is created and sent by Besample; Labvanced only reads it off the link as part of URL_Search_Params.

How it's recorded

The full query string is read once, right when the session starts, and stored in the URL_Search_Params global variable from that point on. From there, it stays available for the rest of the experiment, the same as any other variable, ready to read whenever your study design needs it.

Internally, the value is stored as a JSON string of the form:

{"is_truncated": false, "params": {"type": "besample", "battempt": "3", "tc": "276", "tg": "f"}}

A repeated parameter name holds an array of its values. is_truncated is true only if the query string is unusually long, over 4096 characters. In that case, the parameters that would have pushed it past the limit are left out, and everything shorter is still recorded.

Excluded from the record are Labvanced's own experiment id, and each crowdsourcing platform's participant-identifying parameter, which is saved separately in Crowdsourcing_SubjId instead (for example PROLIFIC_PID for Prolific, bpid for Besample). A few further parameters are excluded for the same privacy reason without being stored anywhere else, such as Besample's bnum, a one-time code tied to a single respondent's completion payout.

How it's used

A Run JavaScript Action is how you pull one value out of URL_Search_Params and act on it. It's not strictly either/or with the simpler alternative: if you only need one specific, already-named value, a Get URL Parameter Action gets it with no JSON or code. Reach for URL_Search_Params when you want the complete picture of what was on the link kept on record, not just the one parameter you set out to extract, independent of whether every parameter's name is already known.

tc is Besample's own official parameter for the respondent's target country. Choose a trigger first, for example On Frame Start or a button click, whatever should kick off the read. Then use Run JavaScript to read tc out of URL_Search_Params and save it into a variable you create and fully control, for example Target_Country (create it first in the Variables tab):

var urlParams = JSON.parse(getValue("URL_Search_Params"));
setValue("Target_Country", urlParams.params.tc || ""); // ISO 3166-1 numeric country code, empty string if tc isn't on the link

The || "" matters: unlike Get URL Parameter, which defaults to an empty string automatically when a parameter is missing, a missing value here throws an error if you pass it straight into setValue with no fallback. Always fall back to a default when reading a parameter that might not be present.

From there, use Target_Country like any other variable. For example:

Trigger: On Frame Start
Action: Requirement (If... Then) → left side Variable → Target_Country, comparison equal, right side Constant Value → 276 → Then: Jump to Next Frame → your country-specific task

See this method next to Get URL Parameter in a working example: Fetch Custom URL from Global Variable, a library study that reads the same URL parameter both ways so you can compare the results directly. Copy this URL to try it directly:

https://www.labvanced.com/player.html?id=88576&tc=276

If you have any questions, please contact us.

FAQ

Do I need to set anything up to use URL_Search_Params?
No. It is recorded automatically for every study, with no event or variable setup required.
Can I select URL_Search_Params directly in the variable picker?
It's hidden from the default list, the same way a handful of other internal variables are, but not unselectable: check `Show all variables` in that same dialog and it appears, or add it to the default list permanently from the Variables tab. Either way, its value is the full JSON string, not one parameter, so most uses still need a `Run JavaScript` action to parse it and pull out the field you want.
Will this ever include a participant's crowdsourcing id?
No. Whichever parameter a crowdsourcing platform uses to identify its participant (for example PROLIFIC_PID or bpid) is excluded from this record and saved separately in `Crowdsourcing_SubjId` instead.

Further Reading

System Variables

System Variables

What system variables are as a category, URL_Search_Params among them, and where the full reference table lives.

Launch & Participate

URL Parameters

The full reference of parameters Labvanced reads from a participation link, including how to build custom links.

Run JavaScript Action

Run JavaScript Action

How to read and set Labvanced variables with custom JavaScript, the mechanism behind the example above.

Get URL Parameter Action

Get URL Parameter Action

The simpler alternative when you already know the exact parameter name you need, no JSON or code required.