Skip to content

[WIP] feat: Add experiment segmentation by user attributes - #10

Closed
buildwithtalia with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-2f60b8d6-94a6-4b03-9855-7f64517eff18
Closed

[WIP] feat: Add experiment segmentation by user attributes#10
buildwithtalia with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-2f60b8d6-94a6-4b03-9855-7f64517eff18

Conversation

Copilot AI commented Sep 17, 2025

Copy link
Copy Markdown

Analysis Complete - Implementing User Attribute Segmentation for A/B Testing

Task: Complete JIRA ticket MKTG-6535 to add support for experiment segmentation by user attributes (location, device type, user tier).

Current State Analysis:

  • ✅ Repository has a working React frontend and Express.js backend
  • ✅ Basic experiment management exists (create, update, delete experiments)
  • ✅ Variant assignment and tracking system is implemented
  • ✅ TargetingRule interface exists but only supports percentage-based targeting
  • ✅ Build system works correctly

Implementation Plan:

Backend Changes:

  • Update TargetingRule interface to support attribute-based conditions
  • Add user attribute matching logic in assignVariant function
  • Update experiment assignment API to handle user attributes
  • Add validation for attribute-based targeting rules
  • Update sample data to include attribute-based experiments

Frontend Changes:

  • Add targeting rules section to ExperimentForm component
  • Create UI components for defining attribute conditions
  • Update experiment types to include targeting rules
  • Add user-friendly interface for setting up attribute-based segmentation

Testing & Documentation:

  • Add tests for attribute matching logic
  • Update API documentation for new targeting features
  • Add example use cases in documentation

User Attributes to Support:

  • Location (country, region, city)
  • Device type (mobile, desktop, tablet)
  • User tier (free, premium, enterprise)
  • Custom attributes support

Current Technical Assessment:

  • Server runs on port 3002, Frontend on port 3003
  • TypeScript setup is working
  • Build and development workflow functional
  • No existing test framework found (will add if needed)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants