This video requires a TekCasts subscription.

Available to all subscribers with an active plan.

Dec 25, 2025
31m:43s

Take Survey Fingerprinting

Classification
Software Engineering | Frameworks | Laravel
Keywords
laravel | php

About This Episode:

In this episode of Laravel: The Pragmatic Way, we explore how to generate a unique “fingerprint” for survey participants using a combination of PHP and JavaScript signals.

You’ll learn what fingerprinting is, why it matters, the ethical considerations, and how to integrate a JavaScript fingerprinting library into your Laravel workflow.

🧠 What You’ll Learn
- A method of producing a unique identifier using user “signals.”
- Why fingerprinting must be handled with caution — privacy, consent, regulation concerns.
- Which data you can access server-side vs client-side.
- Including adding routes, generating fingerprints, and pre-filling survey responses.

🪪 Example Signals
- PHP Signals (server-side): IP address, User-Agent, Accept-Language, Accept headers, Referer header, Cookies
- JavaScript Signals (client-side): Everything PHP offers plus installed fonts, plugins/extensions, platform info, screen resolution, OS, touch capabilities, GPU/audio/video data, and more.

🛠️ Survey Workflow Changes
1. Install the JS Fingerprinting Library: https://github.com/jackspirou/clientjs

2. Update the route /s/{survey:hash}
- No longer shows questions directly
- Generates the fingerprint
- Provides a “Take Survey” link: /s/{survey:hash}/{fingerprint}

3. Create the route /s/{survey:hash}/{fingerprint}
- Ensures a SurveyResponse record exists
- Passes SurveyResponse + SurveyResponseAnswers to the view
- Pre-fills previous answers automatically

💥 About the Series:
Pragmatic Laravel focuses on building real applications with Laravel — emphasizing clarity, maintainability, and thoughtful design decisions instead of shortcuts or magic.

#Laravel #PHP #WebDevelopment #Fingerprinting #Security #Controllers #Forms #JavaScript #FullStackDevelopment #TekCasts #LearnLaravel #Routes #SurveyApp
Bob Cravens

Bob Cravens

Owner
TekFoundry
Wisconsin
United States
Short Bio:
Bob Cravens is a seasoned technology leader, software architect, and educator with a passion for empowering others through practical, real-world knowledge. As the founder of TekFoundry, Bob has dedicated his career to designing and delivering innovative software solutions that combine cutting-edge technology with elegant simplicity.

At TekCasts, Bob leverages over two decades of experience in software engineering, application architecture, and team leadership to create engaging, high-impact courses for developers and technology professionals. His instructional style is rooted in practical application, offering insights drawn from his extensive background in industries like medical devices and global technology consulting.

Bob’s expertise spans a variety of technologies and methodologies, including PHP/Laravel, FastAPI, and DevOps, as well as architecture best practices and team dynamics. Whether teaching foundational concepts or advanced strategies, he’s passionate about helping others turn complex challenges into streamlined solutions.

When not crafting elegant code or inspiring the next generation of tech innovators, Bob enjoys exploring the intersection of technology, business strategy, and creative problem-solving.