使用GTM启用HubSpot的数据层
有什么方法可以使用GTM在网站(内置HubSpot)中启用数据层? 有任何文章或工具吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有什么方法可以使用GTM在网站(内置HubSpot)中启用数据层? 有任何文章或工具吗?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
如果您已经在网站上部署了GTM,则可以使用它。 GTM会自动部署DataLayer。您可以在开发控制台中检查它。
如果您需要将某些东西推入其中,HubSpot列出了其全球可访问的变量在这里JS的存在需要从全球范围中获取这些变量。
和是将数据从HubSpot推向数据层的一个示例。
If you already deployed GTM on the site, then you have it. GTM deploys dataLayer automatically. You can check it in the dev console.
If you need to push certain things into it, Hubspot lists its globally accessible variables to be used here but you can as well just use them without dataLayer since GTM has all the JS presence needed to grab those variables from the global scope.
And here is an example of pushing the data from hubspot to the dataLayer.