【发布时间】:2015-10-29 09:28:26
【问题描述】:
我已将谷歌分析插件添加到我的项目中。当我在 Unity 编辑器中运行它时,一切正常 - 我可以在 Google Analytics 网站的“实时”选项卡中看到 1 个人在桌面上玩。第二天,我可以在“受众”选项卡中看到所有数据。当我将它推送到我的 Android 设备时,它似乎根本不起作用。
我已经尝试使用带有 VERBOSE 日志记录的 logcat 并且没有错误。这是一个示例项目运行:
D/Unity (25299): GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_
D/Unity (25299): texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
I/Unity (25299): Initializing Google Analytics 0.1.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Initializing Google Analytics Android Tracker.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Logging screen.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Enabling uncaught exception reporting.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Logging screen.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Logging screen.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Logging screen.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Logging event.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
I/Unity (25299): Logging event.
I/Unity (25299):
I/Unity (25299): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25299):
清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app" android:theme="@android:style/Theme.NoTitleBar" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>
根据谷歌分析实时页面,没有人在玩游戏。认为它可能是实时选项卡不适用于 Android 设备 - 第二天,仍然没有来自 Android 的数据,只有桌面。任何想法可能是什么原因?
【问题讨论】:
-
只是检查,但您创建的应用程序 Google Analytics 帐户是正确的,而不是网站 Google Analytics 帐户。
-
是的,我在我的 Google Analytics(分析)帐户上创建了移动应用媒体资源。