Universal Analytics Tag未在GTM中触发

时间:2015-10-30 03:29:13

标签: android google-analytics google-tag-manager

我是GTM的新手,并且对Universal Analytics的解雇感到头痛。我关注了this step by step教程,但从未在我的Google Analytics上发生任何事件。如果有的话,请指出我的错误。我的配置如下:

  1. 配置UA ID和事件参数: {{Event Category}} {{Event Action}} {{Event Label}} {{Event Value}}是我创建的变量 enter image description here
  2. 以下是我为{{Event Category}}配置的方法。其他配置相同。

    enter image description here

    1. 设置"要设置的字段"设置: {{App Name}} {{App Version Code}}是预定义变量。 enter image description here

    2. 事件触发器设置: enter image description here

    3. enter image description here

      1. 最后,这是我如何将事件推送到datalayer:
        • 初始化启动画面活动。 test_v8是我从GTM下载的二进制文件。
      2. >

            PendingResult<ContainerHolder> pending =
                    TagManager.getInstance(getApplicationContext()).loadContainerPreferNonDefault(CONTAINER_ID,
                            R.raw.test_v8);
            // The onResult method will be called as soon as one of the following happens:
            //1. a saved container is loaded
            //2. if there is no saved container, a network container is loaded
            //3. the request times out. The example below uses a constant to manage the timeout period.
            pending.setResultCallback(new ResultCallback<ContainerHolder>() {
                @Override
                public void onResult(ContainerHolder containerHolder) {
                    ContainerHolderSingleton.setContainerHolder(containerHolder);
                    Container container = containerHolder.getContainer();
                    ContainerHolderSingleton.setContainerHolder(containerHolder);
                    ContainerLoadedCallback.registerCallbacksForContainer(container);
                    containerHolder.setContainerAvailableListener(new ContainerLoadedCallback());
                }
            }, 2, TimeUnit.SECONDS);
            launchApplication();
        }
        
        • 用户点击按钮时推送事件:
         dataLayer.pushEvent("action", DataLayer.mapOf("category", "test category", "action", "test action", "label", "test label"));
        

        更新:我使用GTM V4 for Android。

1 个答案:

答案 0 :(得分:0)

我通过删除{{Event Value}}配置修复了此问题。将该字段留空,GTM就像魅力一样。