我发现如何将GTMv4用于GA和GTMv5用于FA,但对于v5 + GA没有任何信息(对于Web端来说有点更多信息)。如何从GA v4迁移到GTM v5(移动版)?
是正确的替代品(在每种情况下)?
情况1:
Bundle params = new Bundle();
params.putString("screenName", screenName);
params.putString("screenID", screenID);
df.logEvent("openScreen", params);
从
getDefaultTracker().setScreenName(screenName);
getDefaultTracker().send(new HitBuilders.ScreenViewBuilder()
.setCustomDimension(3, screenID);
情况2:
Bundle params = new Bundle();
params.putString("category", getCategory());
params.putString("action", getAction());
params.putString("label", getLable());
params.putInt("value", 0);
params.putString("name", "start");
df.logEvent("event", params);
从
getDefaultTracker().send(new HitBuilders.EventBuilder()
.setCategory(getCategory())
.setAction(getAction())
.setLabel(getLable()))
.setValue(0)
.setCustomDimension(2, "Start")
.build());
那么,如何配置标签?在v4-> ga手册中,我们有变量类型“数据层变量”。什么是GTMv5的模拟?
此外,我可以获得绑定数据的所有密钥?从手动V4 IMG,但我不能找到V5
从手动类似的信息:
Event Name: The value is set to "eventNameXYZ" when the following code in your app is executed:
Android:
FirebaseAnalytics.getInstance(mContext).logEvent("eventNameXYZ", null);
但如何设置值?我只能用“标题”创建“新变量”。或者需要设置相同的密钥,例如“eventNameXYZ”?
次要问题:
它可以使用GTM +火力地堡对于保存在本地存储数据?
更新
aghhhr,为什么分开的单选按钮? +自定义参数看起来像提示:(
对不起,我的第二个问题是不清楚的。我想删除我的记录器(寻找bug)。那么,是否有可能使用你的dataLayer(logEvent)来存储数据到文件(我的路径)?或者可以给出建议以使用其他机制(故障排除)。目前看起来像: params.putString(“bluetoothType”,“standart”); params.putInt(“attempt”,3); df.logEvent(“connect”,params); +标记(TAG,“bluetoothType - >”+“standart”+“attempt”+ 3) –
Logger.debug(TAG,“bluetoothType - >”+“standart”+“(attempt +3 +”)“)* –
所以你想通过使用GTM来登录来取代你的日志?对于Android,我建议坚持使用股票记录器。这样做可以很好地与工具集成,甚至可以使用proguard优化调试级别日志记录(http://stackoverflow.com/questions/13218772/removing-log-call-using-proguard)。 –