我發現如何將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)。 –