如何配置的Andr​​oid谷歌标签管理器V4与谷歌Analytics(分析)(通用分析) [英] How to configure Android Google Tag Manager v4 with Google Analytics (Universal Analytics)

查看:138
本文介绍了如何配置的Andr​​oid谷歌标签管理器V4与谷歌Analytics(分析)(通用分析)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用谷歌标签管理报告screenviews和事件,以谷歌Analytics(分析)。我跟着谷歌的教程,但我不能,甚至报告screenviews。 还花时间寻找在谷歌,但没有匹配。几乎所有现有的资料是Android的V3还是老GTM Web界面。

I'm trying to use Google Tag Manager to report screenviews and events to Google Analytics. I followed the google's tutorial but I'm not able to even report the screenviews. Also spent hours searching in google but there was no match. Almost all the information available is for Android's v3 or the old GTM web interface.

这是我的配置

推事件数据层引发任何错误。但是屏幕名似乎尚未发送。

Pushing the event to the data layer throws no error. However screenName seems not been sent.

Java的code

Java code

public static void pushScreenViewEvent(@NonNull Context context, @NonNull String screenName) {
    DataLayer dataLayer = TagManager.getInstance(context).getDataLayer();
    dataLayer.pushEvent("screenView",
            DataLayer.mapOf("screenName", screenName));
}

推送数据后的调试日志

Debug log after push data

02-23 19:12:39.376  31787-31888/com.example.debug V/GoogleTagManager﹕ Sending hit to service   PATH: https:  PARAMS: sr=1080x1776,  a=558676027,  v=1,  ht=1424686354314,  an=Example app,  ul=ja-jp,  t=appview,  _u=.L,  tid=UA-XXXXXX-1,  cid=XXXXXX,  aid=com.example.debug,  av=1.0.0,

谷歌播放服务版本

Google Play Services version

compile 'com.google.android.gms:play-services-base:6.5.87'

有本教程中,但它是为老GTM V3与老GTM网络截图 https://developers.google.com/tag-manager/android/v3 / UA#screenviews

There's this tutorial but it is for the old GTM v3 with the old GTM web screenshots https://developers.google.com/tag-manager/android/v3/ua#screenviews

推荐答案

好吧,这是我的错。 有两个问题。

Ok, it was my fault. There was two problems.

  1. 字段设置错了 为了跟踪屏幕GA有必要设置显示名称的CD
    ;
    &放大器测量协议参数 在我的情况客户端编号用户ID 也是必要的,这就是为什么我把&放大器; CI &放大器; UID

  1. Fields to set were wrong In order to track the screen in GA it's necessary to set the Screen Name's Measurement protocol parameter &cd
    In my case Client Id and User Id are also necessary, that's why I send &ci and &uid

我使用的是默认的二进制容器从不同的测试帐号。使用它的工作就像一个魅力的正确的容器后。

I was using a default binary container from a different test account. After use the correct container it worked like a charm.

这篇关于如何配置的Andr​​oid谷歌标签管理器V4与谷歌Analytics(分析)(通用分析)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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