将DOM元素推到Datalayer
我是新手使用Google标签管理器的新手。
我希望能够捕获页面正文中显示的电子邮件。我能够通过创建一个DOM元素变量来捕获这一点。
我希望能够在GA4中看到电子邮件的值。有什么方法可以将DOM元素推向数据层?
还是有一种方法可以使用Datalayer捕获页面底部显示的电子邮件?
感谢您的帮助。
I'm new to using Google Tag Manager.
I want to be able to capture the email displayed in body of the page. I was able to capture this by creating a DOM Element variable.
I want to be able to see the values of the emails in GA4. Is there a way I could push the DOM element to the DataLayer?
Or is there a way to capture the emails displayed in the bottom of the page thru using the DataLayer?
Thanks for your assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有很多方法可以这样做。
最好的方法可能是创建一个自定义的HTML标签,该标签将页面加载上的元素删除并将其推向Datalayer。
可以共享网页URL吗?这样,我可以与您共享一些示例代码。
There are many ways to do so.
The best way would probably be to create a custom HTML Tag, that scrapes the elements on page load and pushes these to the DataLayer.
Can share the webpage URL? This way I could share some example code with you.
您可以首先为电子邮件配置
变量
,然后尝试将其推到tag(custichtml)
其他方法中,如果您设置了
actairable
>已经。您可以将其在GA4标签中配置为用户属性
,但请记住,GA4不允许您将PII信息发送到GA4,例如电子邮件和其他用户个人信息。
?如果您确实需要,则需要考虑其他工具来收集电子邮件。
You can configure a
Variable
first for the email and try to push it to datalayer in theTag (CustomHtml)
Other way is if you set the
Variable
already. You can just configure it in your GA4 tag as anUser Property
But please remember GA4 is not allow you to send the PII information to GA4 like email and other user personal information.
Google Document
So you might need to consider other tool to collect the email if you really need it.