Add platform-level UTM capture support for authenticated MFE users
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
首先跟踪 frontend-platform 中的 initialize()、经过身份验证的 HTTP 客户端和 logout,以确定捕获、传输和清理的集成点。在决定 cookie 和请求标头应如何工作之前,先查看 RFC 上下文和现有的配置模式。完成的标准是:经过身份验证的 MFE 请求始终携带捕获的 UTM 数据,并且 logout 会移除这些数据;在不存在 UTM 参数时,行为不发生变化。
由索引模型根据 Issue 内容生成。
描述
Problem
Today, UTM parameters are typically captured when unauthenticated users enter the platform through login or registration flows because Django receives the initial request.
However, when an already-authenticated learner lands directly on an MFE page via a marketing campaign URL, the page is rendered entirely client-side and Django never sees the initial page load. As a result, UTM parameters may be visible in the browser URL but are not automatically transmitted to backend services.
For authenticated users, this attribution information is currently lost unless each MFE implements its own custom solution.
Current Workarounds
Current approaches typically involve one or more of the following:
- Implementing UTM capture independently in every MFE
- Relying solely on third-party analytics solutions
- Propagating UTM parameters through internal navigation
These approaches duplicate logic across repositories and require ongoing maintenance whenever new MFEs are introduced.
Proposal
Add generic UTM capture support to frontend-platform so that all MFEs using the framework can benefit automatically.
1. Capture UTM parameters during initialization
Introduce a small utility that:
- Reads standard UTM parameters from the current URL
- Captures:
utm_sourceutm_mediumutm_campaignutm_termutm_content
- Persists them in a configurable cookie
The utility would be invoked from initialize() so capture occurs before authentication setup and outbound API requests.
2. Attach captured UTM data to authenticated requests
Add an interceptor to the authenticated HTTP client that:
- Reads the stored UTM payload
- Includes it in outbound authenticated requests through a dedicated header (for example,
X-Openedx-Utm-Params)
This also provides a fallback path for environments where cookie-based transport may be restricted.
3. Cleanup on logout
Remove the stored UTM data during logout to avoid attribution data persisting across sessions on shared devices.
Benefits
- No per-MFE implementation required
- Works across existing and future MFEs built on
frontend-platform - Provides a consistent mechanism for transporting attribution data
- Reduces duplication across repositories
- Fully additive and inactive when no UTM parameters are present
Questions for Discussion
- Is UTM capture considered an appropriate responsibility for
frontend-platform? - Is a cookie + request-header approach acceptable, or is there a preferred platform-level mechanism?
- Is
initialize()the right integration point for capturing campaign parameters? - Are there privacy, security, or configurability concerns that should be addressed before adopting this capability?
Additional Context
This issue is based on an RFC proposing a platform-wide solution for preserving UTM attribution for authenticated learners landing directly on MFE pages from external campaigns.
The frontend-platform changes described here are intended to provide the generic capture and transport layer, while backend persistence and attribution modeling would remain separate concerns.
- 主要语言
- JavaScript
- 星标
- 38
- 派生
- 90
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/frontend-platform 的其他 Issue
-
a11y
难度 2/5 1-3 小时 新手友好度 76/100
openedx/frontend-platform#745 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
openedx/frontend-platform#837 ·
-
难度 4/5 3-5 天 新手友好度 35/100
openedx/frontend-platform#835 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
openedx/frontend-platform#833 ·
-
难度 5/5 一周以上 新手友好度 30/100
openedx/frontend-platform#764 ·
查看 openedx/frontend-platform 的全部 Issue
相似的 Issue
-
Client execution contract accepts a grant the code never takes可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area: client enhancement priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
opensro-dev/opensro#3808 ·
维护者通常 1 天内回复
-
luciano_blocktronics: sysop chat status views are both keyed TL10 and use itemFormat, which a TextView ignores可能已有人在做 @Z3NMA 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
NuSkooler/enigma-bbs#1058 ·
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue severity: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Static_Chess#163 ·
维护者通常 1 天内回复