- Add libGoogleAnalytics.jar to your project's /libs directory.
- 添加libGoogleAnalytics。jar到项目的/libs目录。
-
Add the following permissions to your project's AndroidManifest.xml manifest file:
向项目的AndroidManifest添加以下权限。xml清单文件:
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-
Add the following code snippet to your project's AndroidManifest.xml manifest file:
将以下代码片段添加到项目的AndroidManifest中。xml清单文件:
<!-- Used for install referrer tracking --> <receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" > </intent-filter> </receiver>
But I never entered my UA-xxxxx-yy ID. The ID entered for Pageviews and Events tracking like this:
但是我从来没有输入我的ua -xxxx -yy ID。
tracker.startNewSession("UA-xxxxx-yy", this);
Google Analytics for Android SDK ReadMe says: (NOTE: do not start the GoogleAnalyticsTracker in your Application onCreate() method if using referral tracking).
With referrer tracking where do i put my ID or not? If need, how? If not, why?
谷歌对Android SDK ReadMe的分析是:(注意:如果使用推荐跟踪,请不要在应用程序onCreate()中启动GoogleAnalyticsTracker)。有了推荐人跟踪,我应该把我的身份证放在哪里?如果需要,如何?如果不是,为什么?
2 个解决方案
#1
7
At first, it seemed strange to me that Google would require those who only need to do install referrer tracking to incorporate two permissions that might otherwise be unneeded, plus a library, into their apps, given that the information needed to track referrers is already available on the Google Play servers, and could presumably be accessed from there via a Web-based interface, similar to the one used to track purchases on the Chrome Web Store. When you consider that the app-based Analytics interface does not even cover purchases via the GP Web pages, the case for doing this seems even more convincing.
起初,奇怪的我看来,谷歌需要那些只需要安装上线跟踪将两个权限,否则是不需要的,加上一个图书馆,到他们的应用程序,考虑到所需的信息来追踪反向链接已经可以在谷歌服务器玩,,大概可以从那里通过一个基于网络的访问接口,类似于一个用于追踪Chrome网上商店购买。当你考虑到基于应用程序的分析界面甚至不包括通过GP网页进行购买时,这样做的理由似乎更有说服力。
This omission still seems odd in the general case of tracking an arbitrary referrer, but I recently discovered that in the specific case where the referrer that you are trying to track comes from an Adwords ad, there seems to be an easier means of tracking Google Play app installs that does not require any modifications to your app. All of this is set up through the Adwords interface, not through Google Play, and not through modifications to your app.
这仍然遗漏似乎很奇怪在一般情况下跟踪任意上线,但我最近发现,在特定的情况下,介绍人,你想跟踪来自Adwords广告,似乎有一种更简单的方式跟踪谷歌玩应用程序安装,不需要任何修改你的应用程序。这是所有的设置通过Adwords接口,不是通过谷歌,而不是通过修改你的应用。
You did not indicate whether your referrers were from Adwords or from some other source or sources, so I'll provide this information, in case it is useful.
你没有说明你的推荐人是来自Adwords还是其他来源或来源,所以我将提供这些信息,以防有用。
This page
这个页面
http://support.google.com/adwords/bin/answer.py?hl=en&answer=1722054
http://support.google.com/adwords/bin/answer.py?hl=en&answer=1722054
describes how to set up conversion tracking of Google Play app sales via Adwords. From that page:
介绍如何通过Adwords设置谷歌播放app销售的转换跟踪。从这个页面:
Tracking mobile app downloads from Google Play doesn't require adding a code snippet. It can be done with no changes to your app's code. Simply follow the steps below.
从谷歌Play跟踪移动应用程序下载不需要添加代码片段。无需修改应用程序的代码就可以完成。只需遵循下面的步骤。
Sign in to your AdWords account at http://adwords.google.com
登陆你的AdWords账户http://adwords.google.com
Click the "Tools and Analysis" tab, and then click the "Conversions" tab.
单击“工具和分析”选项卡,然后单击“转换”选项卡。
Click the "+ New conversion" button. Name your conversion, select "Mobile app download" and click "Save and continue". Enter the package name. (You can find your package name by looking up your app in Google Play. It's the part of the base URL that identifies your application: "https://play.google.com/store/apps/details?id="
点击“+ New conversion”按钮。命名您的转换,选择“移动应用下载”和点击“保存和继续”。输入包名称。(你可以在谷歌Play中找到你的包名。它是标识应用程序的基本URL的一部分:“https://play.google.com/store/apps/details?id=”
Click "Save and continue".
点击“保存并继续”。
On the next screen, click "Done".
在下一个屏幕上,单击“完成”。
Your mobile app downloads conversion data will now start showing up with the rest of your conversion data within 24 hours.
您的移动应用程序下载转换数据现在将开始显示与您的其余转换数据在24小时内。
Note: Mobile application download tracking for Android will only work if your links in Click-to-download or Mobile App Extension ads point directly to the Google Play Store. Third-party tracking URLs are not supported at this time.
注意:Android的移动应用下载跟踪只有当你点击下载或移动应用扩展广告中的链接直接指向谷歌Play商店时才会有效。此时不支持第三方跟踪url。
#2
1
Check the GA SDK implementation at - the measurement is explained very clearly. https://developers.google.com/analytics/devguides/collection/android/v2/campaigns#google-play-implement
检查GA SDK的实现,对测量的解释非常清楚。https://developers.google.com/analytics/devguides/collection/android/v2/campaigns google-play-implement
#1
7
At first, it seemed strange to me that Google would require those who only need to do install referrer tracking to incorporate two permissions that might otherwise be unneeded, plus a library, into their apps, given that the information needed to track referrers is already available on the Google Play servers, and could presumably be accessed from there via a Web-based interface, similar to the one used to track purchases on the Chrome Web Store. When you consider that the app-based Analytics interface does not even cover purchases via the GP Web pages, the case for doing this seems even more convincing.
起初,奇怪的我看来,谷歌需要那些只需要安装上线跟踪将两个权限,否则是不需要的,加上一个图书馆,到他们的应用程序,考虑到所需的信息来追踪反向链接已经可以在谷歌服务器玩,,大概可以从那里通过一个基于网络的访问接口,类似于一个用于追踪Chrome网上商店购买。当你考虑到基于应用程序的分析界面甚至不包括通过GP网页进行购买时,这样做的理由似乎更有说服力。
This omission still seems odd in the general case of tracking an arbitrary referrer, but I recently discovered that in the specific case where the referrer that you are trying to track comes from an Adwords ad, there seems to be an easier means of tracking Google Play app installs that does not require any modifications to your app. All of this is set up through the Adwords interface, not through Google Play, and not through modifications to your app.
这仍然遗漏似乎很奇怪在一般情况下跟踪任意上线,但我最近发现,在特定的情况下,介绍人,你想跟踪来自Adwords广告,似乎有一种更简单的方式跟踪谷歌玩应用程序安装,不需要任何修改你的应用程序。这是所有的设置通过Adwords接口,不是通过谷歌,而不是通过修改你的应用。
You did not indicate whether your referrers were from Adwords or from some other source or sources, so I'll provide this information, in case it is useful.
你没有说明你的推荐人是来自Adwords还是其他来源或来源,所以我将提供这些信息,以防有用。
This page
这个页面
http://support.google.com/adwords/bin/answer.py?hl=en&answer=1722054
http://support.google.com/adwords/bin/answer.py?hl=en&answer=1722054
describes how to set up conversion tracking of Google Play app sales via Adwords. From that page:
介绍如何通过Adwords设置谷歌播放app销售的转换跟踪。从这个页面:
Tracking mobile app downloads from Google Play doesn't require adding a code snippet. It can be done with no changes to your app's code. Simply follow the steps below.
从谷歌Play跟踪移动应用程序下载不需要添加代码片段。无需修改应用程序的代码就可以完成。只需遵循下面的步骤。
Sign in to your AdWords account at http://adwords.google.com
登陆你的AdWords账户http://adwords.google.com
Click the "Tools and Analysis" tab, and then click the "Conversions" tab.
单击“工具和分析”选项卡,然后单击“转换”选项卡。
Click the "+ New conversion" button. Name your conversion, select "Mobile app download" and click "Save and continue". Enter the package name. (You can find your package name by looking up your app in Google Play. It's the part of the base URL that identifies your application: "https://play.google.com/store/apps/details?id="
点击“+ New conversion”按钮。命名您的转换,选择“移动应用下载”和点击“保存和继续”。输入包名称。(你可以在谷歌Play中找到你的包名。它是标识应用程序的基本URL的一部分:“https://play.google.com/store/apps/details?id=”
Click "Save and continue".
点击“保存并继续”。
On the next screen, click "Done".
在下一个屏幕上,单击“完成”。
Your mobile app downloads conversion data will now start showing up with the rest of your conversion data within 24 hours.
您的移动应用程序下载转换数据现在将开始显示与您的其余转换数据在24小时内。
Note: Mobile application download tracking for Android will only work if your links in Click-to-download or Mobile App Extension ads point directly to the Google Play Store. Third-party tracking URLs are not supported at this time.
注意:Android的移动应用下载跟踪只有当你点击下载或移动应用扩展广告中的链接直接指向谷歌Play商店时才会有效。此时不支持第三方跟踪url。
#2
1
Check the GA SDK implementation at - the measurement is explained very clearly. https://developers.google.com/analytics/devguides/collection/android/v2/campaigns#google-play-implement
检查GA SDK的实现,对测量的解释非常清楚。https://developers.google.com/analytics/devguides/collection/android/v2/campaigns google-play-implement