Google Analytics代码管理器失败 [英] Google Analytics Tag Manager fails

查看:168
本文介绍了Google Analytics代码管理器失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google最近发布了一项新功能跟踪代码管理器。


  • https://developers.google.com/tag-manager/devguide#migration

  • https://developers.google.com/tag-manager/reference#varnames



  • 你知道任何成功案例并给出成功的网站html-examples吗?



    我是无法使事件正常工作。
    这是我的网站,但它失败了。您可以通过FF中的Ctrl + U查看哪些代码在里面。
    http://landkey.org
    当我点击应该发送此事件的测试按钮时:.....

     输入类型=按钮onclick =dataLayer.push({'bubbles_event':'ANCHOR_ .....'}); alert('click');value =bubbles

    .....在网络窗格中没有发送任何内容。
    在标签管理器/容器/标签的仪表板中,我设置了一个标签TrackType作为事件设置事件规则,并且双倍检查了几次。

    解决方案

    我想知道是否遇到事件命名空间中存在冲突的问题。我们已自动创建'event'规则/宏类型,以直接映射到dataLayer.push({'event':event_name})。这只适用于以'事件'为关键字的情况。

    在您的代码示例中,您看起来像为事件选择了一个不同的名称,名为'bubble_event'。我为你提供的最简单的建议就是在你的数据层中将'bubble_event'重命名为'event'。这应该有希望工作。

    如果您连接到'bubble_event',那么您可以创建一个数据层变量类型的宏,其中数据层变量名称为'bubble_event'。然后你可以创建一个规则,其中泡泡事件=你正在寻找的任何值。不过,这是最佳做法,建议尽可能使用事件语法,因为这样可以合并所有事件。



    如果您仍然遇到问题,请给我一个机会,让我知道。

    干杯,
    劳拉


    Google recently released a new feature "Tag Manager"

    Do you know any success stories and give successful site html-examples?

    I was not able to make Events working. Here is my site, but it fails. You can see which code is inside by Ctrl+U in FF. http://landkey.org When I click on test button which supposed to send this event: .....

    input type="button" onclick="dataLayer.push({'bubbles_event' : 'ANCHOR_.....  '});  alert('clicking'); " value="bubbles" 
    

    ..... nothing is sent in "Net" pane. In dashboard of "Tag Manager"/Container/Tags, I set up a tag, TrackType as "Event" setup event rule, and double checked this few times.

    解决方案

    I'm wondering if you're running into an issue where there's a collision on the 'event' namespace. We've autocreated the 'event' rule / macro type to map directly to dataLayer.push({ 'event' : event_name }). This only works if you use 'event' as the key.

    In your code example, it looks like you've chosen a different name for your event, called 'bubble_event'. The simplest suggestion I have for you is to just rename 'bubble_event' to 'event' in your data layer. That should hopefully work.

    If you're attached to 'bubble_event', then you could create a macro of type Data Layer variable, where the data layer variable name is 'bubble_event'. Then you could create a rule where Bubble Event = whatever value you're looking for. However, it's best practice and recommended to just use the 'event' syntax wherever possible, since then you can consolidate all your events.

    Give that a shot and let me know if you're still running into issues.

    Cheers, Laura

    这篇关于Google Analytics代码管理器失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆