google-tag-manager add identify properties to dataLayer
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- analytics
调研方向
Reproduce the Segment identify call shown in the issue and inspect window.dataLayer in the Google Tag Manager integration. First determine the intended identify-to-dataLayer behavior and review existing integration entry points and tests, which the issue does not name. Done should define and verify how account and contact become available without an eventless track or manual dataLayer injection.
由索引模型根据 Issue 内容生成。
描述
Hi,
Currently the Segment identify method does not push any user properties to the GTM data layer. Should it?
in the app code
window?.analytics?.identify('userId123', {
account: '12345678',
contact: '[email protected]',
});
but when you console.log the window.dataLayer, you only have the page event which is missing the user properties like account and contact
[{
event: "Loaded a Page"
gtm.uniqueEventId: 1
path: "/blah"
referrer: "blah"
search: ""
segmentAnonymousId: "123123123"
title: "blah"
url: "blah"
userId: "userId123"
}]
This means if I want to use the account property as a dataLayer variable in GTM then I need to explicitly call an eventless track on page load with it, or inject it into the dataLayer manually.
Both approaches seem to go against the Segment best practice.
What should the expected behaviour be?
- 主要语言
- JavaScript
- 星标
- 125
- 派生
- 134
- 平均合并
- 2 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
segmentio/analytics.js-integrations 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 65/100
-
难度 4/5 3-5 天 新手友好度 25/100
segmentio/analytics.js-integrations#784 · 2 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 30/100
-
难度 2/5 1-3 小时 新手友好度 48/100
segmentio/analytics.js-integrations#761 · 8 条评论 ·
查看 segmentio/analytics.js-integrations 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
microsoft/monaco-editor#5563 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
account: profile bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 5 天内回复
-
ai-driven-fuzzing bug claude Minor
难度 2/5 1-3 小时 新手友好度 78/100
linagora/cozy-client#1777 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复