【问题标题】:Tracking an event on a mail formular within an iframe在 iframe 中跟踪邮件公式的事件
【发布时间】:2019-01-21 02:48:06
【问题描述】:

我在 GTM 中设置跟踪时遇到了一些问题。当有人向我们发送邮件时,我创建的标签不会触发。

我想跟踪我网站上的 iframe 中的联系表单发送了多少邮件。 邮件表单由我们的 CMS 系统提供,我可以访问该 iframe 的来源。

我在 GTM 中的设置如下所示:

Trigger configuration
Triggertype: Formular sent
Wait for tags 2000 milliseconds
Check to validate

Page path: contains contact-us

Click id: listform3883_sendbutton

Tag configuration
Tag type: Google Analytics - Universal Analytics
Tracking tyoe: event
Categories: Sent mail 
Label: {{ Form ID }}
{{Google Analytics - UA }}

【问题讨论】:

    标签: email iframe google-tag-manager mail-form samesite


    【解决方案1】:

    这里的重要方面是 iframe 是否在同一个域中

    • 如果不是:您无法从父页面due to security reasons 与其交互,因此您需要在 iframe 页面本身上安装 GTM(即 iframe 页面在其中提供 GTM)。
    • 如果是:如果它不在 iframe 中,那么您只需 inject GTM into the iframe(就像您将任何 HTML 注入 iframe 一样)。

    一旦 GTM 在 iframe 上运行,那么它就是一个简单的表单跟踪任务,与 iframe 的问题无关。

    【讨论】:

    • 好的。 iframe 在同一个域上。因此,如果我正确理解了这一点。我所要做的就是在 iframe 中的内容上插入 gtm 脚本?
    猜你喜欢
    • 1970-01-01
    • 2017-04-02
    • 1970-01-01
    • 2015-01-17
    • 1970-01-01
    • 2012-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多