我正在使用Google Analytics为我的应用安装归因,我有一个这样的网址:
https://play.google.com/store/apps/details?id=com.Slack&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26anid%3Dadmob
我想知道我是否可以在同一个网址中添加自己的查询参数,以获得类似
的内容https://play.google.com/store/apps/details?id=com.Slack&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26anid%3Dadmob%26mytag%3Dtest
当Play商店向我的接收器广播意图时,这可能会产生问题吗?意图也会在URL中添加我自己的标签吗?
答案 0 :(得分:4)
您可以使用adb命令测试应用是否接收非utm参数,以按testing play campaigns中所述广播INSTALL_REFERRER意图。
$ cd <path_to_adb_tool>
$ echo 'am broadcast \
-a com.android.vending.INSTALL_REFERRER \
-n "your.package.name/path.to.receiver" \
--es "referrer" \
"utm_source=test_source&utm_medium=test_medium&utm_term=test_term&utm_content=test_content&utm_campaign=test_name"; \
exit' | ./adb shell
尝试为引荐来源添加自定义标记,如果它到达CampaignTrackingReceiver
,请自行查看。
根据General Campaign & Traffic Source Attribution,我们可以使用setCampaignParamsFromUrl
// Get tracker.
Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
// Set screen name.
t.setScreenName(screenName);
// In this example, campaign information is set using
// a url string with Google Analytics campaign parameters.
// Note: This is for illustrative purposes. In most cases campaign
// information would come from an incoming Intent.
String campaignData = "http://examplepetstore.com/index.html?" +
"utm_source=email&utm_medium=email_marketing&utm_campaign=summer" +
"&utm_content=email_variation_1";
// Campaign data sent with this hit.
t.send(new HitBuilders.ScreenViewBuilder()
.setCampaignParamsFromUrl(campaignData)
.build()
);
如果您的广告系列信息的格式不是Google Analytics广告系列参数,则必须手动发送。一种方法是使用Google Analytics网络界面配置custom dimension or metrics并将其发送为:
// Get tracker.
Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
TrackerName.APP_TRACKER);
t.setScreenName("Home Screen");
// Send the custom dimension value with a screen view.
// Note that the value only needs to be sent once.
t.send(new HitBuilders.ScreenViewBuilder()
.setCustomDimension(1, "premiumUser")
.build()
);
custom dimensions and metrics reporting注意:
自定义维度和指标可在自定义报告中使用 可用于高级细分。自定义尺寸也可以 在标准报告中用作次要维度。