<p>截至2018年8月,使用FCM API发送的消息的统计信息现在可以从控制台看到。从<em>云消息</em>部分,单击<em>报告</em>选项卡。从那里,您将能够按消息类型进行筛选(<code>notification</code>,<code>data</code>,以及所有)</p>
<p><a href="https://i.stack.imgur.com/TaWEq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TaWEq.png" alt="enter image description here"/></a></p>
<p>似乎<em>印象</em>和<em>打开</em>仍然只对使用控制台发送的消息可用。但是<em>Sends</em>现在肯定会统计使用FCM API发送的消息。</p>
<p>引用:<a href="https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html" rel="noreferrer">https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html</a></p>
<hr/>
<p>更新:自去年以来,FCM诊断页面已被禁用。</p>
<hr/>
<p>如果您有Play Dev控制台帐户,并且您的应用程序至少处于Alpha测试中,则可以使用<a href="https://support.google.com/googleplay/android-developer/answer/2663268?hl=en" rel="noreferrer">Diagnostics and Statistics</a>页面。但是,如果您正在寻找一个API,则当前没有可用的API。</p>
<p>否则,我认为你需要的大部分细节(比如有效负载和发送的时间)都可以单独从你的应用服务器上记录下来。</p>
<p>正如@FrankvanPuffelen<a href="https://stackoverflow.com/a/40132973/4625829">here</a>所说,为了支持你在文章中已经提到的:</p>
<blockquote>
<p>The Firebase Notifications charts only show analytics for messages that were sent using the Firebase Notifications panel.</p>
<p>There is currently no public API to send Notifications to audiences. The web interface in the console is the only way to send them.</p>
<p>There is currently no API to feed your own FCM messages into the Firebase Notifications analytics panels.</p>
</blockquote>