我是GTM的新手,并且对Universal Analytics的解雇感到头痛。我关注了this step by step教程,但从未在我的Google Analytics上发生任何事件。如果有的话,请指出我的错误。我的配置如下:
{{Event Category}}
{{Event Action}}
{{Event Label}}
{{Event Value}}
是我创建的变量
以下是我为{{Event Category}}
配置的方法。其他配置相同。
设置"要设置的字段"设置:
{{App Name}}
{{App Version Code}}
是预定义变量。
test_v8
是我从GTM下载的二进制文件。>
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。
答案 0 :(得分:0)
我通过删除{{Event Value}}
配置修复了此问题。将该字段留空,GTM就像魅力一样。