Category: Advanced Features Level: Beginner Reading time: 5 minutes Updated: 2025-10-31

Using Short URLs

Quick Summary: Generate short, memorable URLs for your study links to make distribution easier via email, flyers, or social media.

What You'll Learn

  • Generating short URLs for tests and chains
  • Using short URLs with different participant code methods
  • Tracking URL usage
  • Best practices for distribution

Overview

Instead of sharing long URLs like:

https://peblhub.online/runtime/public-launcher.html?test=tower-of-london&token=STUDY<em>ABC123XYZ&participant=SUBJ001

Generate short, memorable URLs like:

https://peblhub.online/s/a3x9k2

Short URLs are easier to:

  • Type manually
  • Include in printed materials
  • Share via SMS or social media
  • Remember and communicate verbally

Key Features

Auto-generation - One click creates short URL ✅ Click tracking - See how many times link was accessed ✅ Auto-copy - URL copied to clipboard automatically ✅ Reusable - Same parameters always generate same short code ✅ Participant-specific - Each participant code gets unique short URL ✅ Works with all participant methods - Except platform integration

Step-by-Step Guide

Step 1: Navigate to Your Study

  1. Log in and go to My Research Studies
  2. Select your study
  3. Go to Individual Tests or Test Chains tab

Step 2: Configure Participant Method

Choose how participants will be identified:

Dropdown options:

  1. Auto-generate code - Automatic IDs (fingerprinting + numbering)
  2. Enter a code - Manually specify participant ID
  3. Participant code entry - Participants create own codes
  4. Platform Integration - External platforms (Prolific, MTurk, etc.)
Note: Short URLs are not available for Platform Integration method (platform variables can't be encoded).

Step 3: Generate Short URL

For individual tests:

  1. Find the test in your test list
  2. (Optional) Enter a participant code if using manual method
  3. Click the 🔗 Short URL button
  4. Short URL generates and displays below the full URL
  5. URL is automatically copied to your clipboard
For test chains:
  1. Find the chain in your chain list
  2. (Optional) Enter a participant code if using manual method
  3. Click the 🔗 Short URL button
  4. Short URL generates and displays below the full URL
  5. URL is automatically copied to your clipboard
Button changes:
  • Before: 🔗 Short URL
  • After: ✓ Generated

Step 4: Distribute the Short URL

The short URL is ready to share via:

  • Email invitations
  • Printed flyers or posters
  • Text messages (SMS)
  • Social media posts
  • QR codes (use any QR code generator)
  • Verbal communication (read aloud)

Step 5: Track Usage (Optional)

The short URL section shows:

  • Short URL: The generated link (clickable to test)
  • Status: "(new)" or "(existing)" if previously generated
  • Copy button: Click to copy again anytime

Click tracking shows:

  • Total number of clicks
  • First seen timestamp
  • Last accessed timestamp

Examples

Example 1: Auto-Generated Participant IDs

Scenario: Recruiting via email, want automatic ID assignment

Steps:

  1. Select "Auto-generate code" from dropdown
  2. Leave participant code box empty
  3. Click 🔗 Short URL for your test
  4. Get: https://peblhub.online/s/M7x3pQ9
  5. Send this one link to all participants
What happens: Each unique participant who clicks gets a unique ID automatically via fingerprinting + sequential numbering.

Example 2: Specific Participant Codes

Scenario: Lab study, need to track specific participants

Steps:

  1. Select "Enter a code" from dropdown
  2. Enter "SUBJ001" in participant code box
  3. Click 🔗 Short URL
  4. Get: https://peblhub.online/s/k2N8vRw
  5. Give this link to participant SUBJ001
  6. Change code to "SUBJ002"
  7. Click 🔗 Short URL again
  8. Get: https://peblhub.online/s/P4m7xSt
  9. Give this different link to participant SUBJ002
What happens: Each short URL embeds a specific participant code.

Example 3: Participant Self-Generated Codes

Scenario: IRB requires participants create their own anonymous codes

Steps:

  1. Select "Participant code entry" from dropdown
  2. Click 🔗 Short URL
  3. Get: https://peblhub.online/s/Q8mZrTv
  4. Share this one link with all participants
What happens: Clicking the link takes participants to a page where they create and enter their own unique code before starting the study.

Example 4: Reusing URLs

Scenario: Need to resend a link to a participant

Steps:

  1. Enter the same participant code you used before
  2. Click 🔗 Short URL again
  3. Get the same short URL as before
  4. Status shows "(existing)"
What happens: The system recognizes the combination already exists and returns the same short code. Participant can reuse the same link.

Short URL Format

Short URLs follow this pattern:

https://peblhub.online/s/{CODE}

Where {CODE} is a 7-character alphanumeric string:

  • Lowercase letters: a-z (excluding l to avoid confusion with 1)
  • Uppercase letters: A-Z (excluding I, O to avoid confusion with 1, 0)
  • Numbers: 2-9 (excluding 0, 1 to avoid confusion with letters)

Example codes: a3x9k2, M7p4Qr9, T5n8Vwx

Why exclude certain characters? To avoid confusion when reading/typing:

  • 0 (zero) looks like O (letter)
  • 1 (one) looks like l (lowercase L) and I (uppercase i)

How It Works

Generation

  1. You click 🔗 Short URL
  2. System combines: full URL + token + participant code (if any)
  3. Checks if this combination already has a short code
  4. If exists: returns existing code (prevents duplicates)
  5. If new: generates random 7-character code
  6. Saves mapping in database
  7. Returns short URL and copies to clipboard

Redirection

  1. Participant clicks short URL (/s/a3x9k2)
  2. System looks up short code in database
  3. Increments click counter
  4. Updates last accessed timestamp
  5. Redirects to full PEBL URL
  6. Test/chain launches normally

Supported URL Types

Short URL works with:

  • ✅ Individual tests
  • ✅ Test chains
  • ✅ All participant code methods (except platform integration)
  • ✅ Manual participant codes
  • ✅ Auto-generated codes
  • ✅ Self-generated participant codes

Not supported:

  • ❌ Platform integration URLs (variables can't be encoded)

Best Practices

1. Test Before Distribution

Always click your short URL to verify:

  • Redirect works correctly
  • Test/chain launches properly
  • Participant code is correct (if using manual codes)
  • Data uploads successfully

Use "Try it out" or test yourself as a participant.

2. Keep Records

Create a spreadsheet mapping:

  • Participant ID → Short URL
  • Distribution date
  • Any notes about that participant

Example:

Participant | Short URL                     | Sent Date  | Notes

SUBJ001 | peblhub.online/s/k2N8vRw | 2025-10-31 | Lab visit SUBJ002 | peblhub.online/s/P4m7xSt | 2025-10-31 | Lab visit

SUBJ003 | peblhub.online/s/X7mZrTv | 2025-11-01 | Remote

3. Use for Distribution, Not Development

Short URLs for:

  • Sharing with participants
  • Printed materials
  • Email campaigns
  • Social media

Full URLs for:

  • Testing and development
  • Technical troubleshooting
  • Seeing exact parameters
  • Admin work

4. Don't Share Publicly

Each short URL:

  • Is tied to your study
  • Uses your data storage
  • May have associated costs (depending on tier)
  • Should only be accessed by authorized participants

Don't post on public websites, forums, or social media where unauthorized people might click.

5. Verify Click Counts

Periodically check click counts:

  • Unusually high: Possible unauthorized access
  • Zero clicks: Check if URL was actually sent
  • Multiple clicks per participant: Normal (may return to link)

Troubleshooting

"Invalid study token" Error

Cause: Study token doesn't exist in database

Solutions:

  1. Verify you're on correct study's management page
  2. Check study is active
  3. Contact administrator if issue persists

Short URL Doesn't Redirect

Cause: Web server rewriting not configured

Solutions:

  1. Verify Apache modrewrite or nginx rewrite rules enabled
  2. Contact system administrator
  3. Use full URL as fallback

Can't Generate Short URL

Causes:

  • Study is inactive
  • Don't have edit permissions
  • Selected platform integration method (not supported)

Solutions:

  1. Activate study if inactive
  2. Contact study owner for permissions
  3. Switch from platform integration to another participant method

Short URL Goes to Wrong Test

Cause: Cached mapping or browser cache

Solutions:

  1. Clear browser cache (Ctrl+F5 or Cmd+Shift+R)
  2. Try in incognito/private window
  3. Check database for short code mapping
  4. Contact administrator if mapping is wrong

Participant Sees Old Parameters

Cause: Short URL was created before parameter changes

Solutions:

  1. Short URLs are permanent - parameters embedded when created
  2. Regenerate short URL after changing parameters
  3. Old short URL will keep old parameters
Important: If you change test parameters after creating a short URL, the short URL will still use the old parameters. Generate a new short URL to get updated parameters.

Limitations

Current Limitations

  • Cannot edit: Once created, short codes are permanent
  • Cannot delete: No UI to delete (database admin only)
  • Basic tracking: Shows total clicks, not individual access logs
  • No expiration: Short URLs remain active indefinitely
  • Platform integration: Not compatible with platform variable URLs

Future Enhancements

Planned improvements:

  • Custom short codes (choose your own code)
  • Bulk generation (multiple participants at once)
  • QR code auto-generation
  • Detailed analytics dashboard
  • Management page (list all, delete, disable)
  • Expiration dates for temporary studies

Advanced: Database Storage

Short URLs are stored in the shorturls table:

Schema:

  • shortcode: The 7-character code
  • fullurl: Complete PEBL URL with parameters
  • tokenid: Study token (for access control)
  • testid: Test identifier
  • participantcode: Participant ID (if specified)
  • createdby: Username who created it
  • clicks: Total click count
  • firstseen: Creation timestamp
  • last_accessed: Most recent click timestamp

Access control: Short URLs are linked to study tokens, ensuring only valid study participants can use them.

Related Topics


Need more help? Contact your platform administrator or see related topics above.


Related Topics