Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

考虑提供页面 ID 的配置 #17

Closed
hotoo opened this issue Jul 15, 2013 · 1 comment
Closed

考虑提供页面 ID 的配置 #17

hotoo opened this issue Jul 15, 2013 · 1 comment
Milestone

Comments

@hotoo
Copy link
Member

hotoo commented Jul 15, 2013

  • 在淘宝、ICBU,由于提供个性域名,同一个页面会存在多个 URL 地址。
  • 在支付宝,个人收款主页 下每个用户主页的 URL 地址也不相同,但使用的是同一份源码。

可选方案:

  • 前端方案:monitor.js 中提供设置页面 ID 的接口。
    • 简单:前端实现方案监控,可以保证后端更简单。
  • 后端方案:monitor-agent 中根据 URL 进行自动转换。
    • 目前支付宝个人收款主页就是用的这个方案。
    • monitor.js 保持简单。
    • 但日志分析会比较复杂,而且一旦有新的 URL 规则变化,不能提前自动处理。
@hotoo
Copy link
Member Author

hotoo commented Jul 19, 2013

考虑到需求的合理性和方案的简单性,决定如下:

  • 自动识别页面头部的 meta[name=pageid][content=?] 元素中 ? 的内容。
  • 如果 ? 不为空,则监控数据中发送 pageid 字段。

很多场景下,页面的头、尾是公用的,这应该使用变量方式传入。例如支付宝可以通过 uisvr 设置变量。
也可以在引入 monitor 后置脚本之前,通过 JavaScript 或其他方式修改这个 meta 内容。

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

No branches or pull requests

1 participant