A comprehensive toolkit for integrating Generative AI interactions into Qualtrics surveys and experiments, enabling researchers to harness GenAI capabilities without programming expertise.
QualtriGen democratizes the use of GenAI in marketing research by providing ready-to-deploy JavaScript implementations that integrate directly into Qualtrics. This repository accompanies the paper "Integrating GenAI Interactions in Marketing Studies: A Methodological Guide" and demonstrates how researchers can use AI coding assistants to create custom GenAI implementations from natural language descriptions.
Instead of learning to code, researchers can describe what they want in plain English to AI coding assistants (like Cursor or Windsurf), which then generate the necessary JavaScript code for Qualtrics integration.
This repository contains four fully-functional GenAI applications, each demonstrating different research paradigms:
Research Focus: Understanding how consumers navigate information search with GenAI
- Integrates OpenAI's GPT with web search capabilities
- Tracks search patterns, clicked links, and decision paths
- Captures complete interaction logs for behavioral analysis
- Use Case: Study how AI-synthesized search results influence consumer decision-making
Research Focus: Human-AI collaboration in creative tasks
- Dual-modality system supporting both text and image generation
- Uses Google's Gemini (text) and Imagen (images)
- Automatic intent detection routes requests appropriately
- Use Case: Investigate creative ownership, quality, and diversity in AI-assisted creation
Research Focus: Scaling qualitative research with AI interviewers
- Multi-agent system with specialized interviewer roles
- Voice input support for natural conversations
- Intelligent response assessment with targeted follow-ups
- Use Case: Conduct hundreds of in-depth interviews simultaneously
Research Focus: Testing personalization and persuasion effects
- Creates AI personas based on participant data
- Simulates conversations with "future selves" or tailored advisors
- Leverages personal values and context for authentic interactions
- Use Case: Study behavior change interventions and personalized marketing
Each application offers two implementation approaches:
Qualtrics → JavaScript → GenAI API
- ✅ Quick setup (15-30 minutes)
- ✅ No server required
- ✅ Perfect for pilots and small studies
⚠️ API key visible in browser (use prepaid credits)
Qualtrics → JavaScript → Your Server → GenAI API
- ✅ API keys hidden from participants
- ✅ Better for large-scale studies
- ✅ Professional deployment standard
⚠️ Requires server setup (e.g., Render.com)
- Qualtrics account with JavaScript editing permissions
- API key from your chosen GenAI provider (OpenAI, Google, or via OpenRouter)
- Modern web browser (Chrome, Safari, or Edge recommended)
- (Optional) AI coding assistant for customization (Cursor or Windsurf)
-
Choose an Application
- Browse the four applications above
- Each folder contains complete implementations with detailed READMEs
-
Select Implementation Type
- Start with
direct_frontend_implementation/
for testing - Use
backend_implementation/
for production studies
- Start with
-
Get Your API Key
- Follow instructions in the Web Appendix (see paper) for obtaining API keys
- Set up prepaid credits or spending limits for security
-
Deploy to Qualtrics
- Copy the JavaScript code from your chosen application
- Add required Embedded Data fields in Survey Flow
- Insert code into a Text/Graphic question
- Test with anonymous survey link (not preview mode)
Transform these tools for your specific needs without coding:
-
Install an AI Coding Assistant
-
Describe Your Modification Example: "Modify the search tool to track time spent reading each result and add a follow-up question after each search"
-
Let AI Generate the Code
- The assistant will modify the existing code
- Review changes before accepting
- Test thoroughly in Qualtrics
See the paper's Section 3.2 for detailed guidance on working with coding assistants.
All applications automatically save interaction data to Qualtrics Embedded Data fields:
- Text Interactions: Stored directly in survey exports
- Conversation Logs: Complete transcripts with timestamps
- Behavioral Metrics: Response times, interaction counts
- Media Files: Images/audio saved to cloud storage with URLs in data
- Always use prepaid credits when using direct frontend implementation
- Set spending limits in your API provider dashboard
- Monitor usage during data collection
- Consider backend implementation for sensitive research
- Obtain IRB approval for AI interaction studies
- Clearly disclose AI usage in consent forms
- Review data transmission policies (participant data goes to AI providers)
- See paper's discussion for comprehensive ethical guidance
- Full Paper: Integrating GenAI Interactions in Marketing Studies: A Methodological Guide
- Web Appendix: Technical details, API setup, additional walkthroughs
- Individual READMEs: Detailed instructions in each application folder
- API Documentation Links:
-
Use GenAI for Troubleshooting
- Copy error messages into ChatGPT/Claude with context
- Ask for debugging help with your specific setup
-
Check Application READMEs
- Each folder contains troubleshooting sections
- Common issues and solutions documented
-
Contact
- For persistent issues, contact the repository owner through GitHub
- Open an issue for bugs or feature requests
We encourage researchers to share their GenAI implementations!
To contribute:
- Fork this repository
- Create your application following our structure
- Include both frontend and backend implementations if possible (take out API keys)
- Add comprehensive documentation
- Submit a pull request
Share your research:
- Open a Discussion to share published studies using these tools
- Post novel applications or modifications
- Discuss methodological insights
If you use these tools in your research, please cite:
[Citation to be added upon publication]
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
### MIT License
Copyright (c) 2025 QualtriGen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.