Firebase 将于 5 月 14 日重返 Google I/O 大会!
立即报名。
Firebase In-App Messaging 有哪些用途?
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
通过 Firebase 控制台修改消息的样式、定位和推送时间,以有意义的方式吸引用户群。
Firebase In-App Messaging 提供消息模板,您可以进行实验并根据自己的喜好进行自定义。
自定义消息界面
您可以使用界面设计富有吸引力且简洁明了的模板来设置消息样式。可用的模板如下:
消息模板 |
说明 |
卡片 |
|
模态 |
- 包含一个操作按钮的灵活消息对话框
- 只需使用您要展现的内容设置消息标题
|
仅图片 |
- 上传您的自定义消息
- 可根据自己的审美轻松调整显示效果
|
横幅 |
|
详细了解消息模板
使用仅图片消息模板,上传您设计的消息以完成以下操作:
- 根据您的应用的外观风格和品牌特征,为消息使用合适的颜色、字体和格式。
- 提供主题促销信息。使用具有个性化自定义字体和背景图案的消息发送万圣节折扣。用户可以点击整条消息以了解详情或忽略该消息。
希望获得更大的自由度?通过代码修改 Firebase 消息模板的显示效果。
了解详情
定位特定用户
对于每个广告系列,您都可以根据特定受众群体的行为、语言、互动度等信息来定位消息。
可以考虑将卡片消息与 Firebase Dynamic Links 相结合,对消息进行如下定位配置:
- 定位上次应用互动时间为一到七天的用户,确保其为活跃用户。询问互动用户是否喜欢您的应用。根据他们的回答,深层链接到 Google Play 进行审核或调查他们的反馈。
- 让用户可以轻松探索您的社交媒体应用,消除注册账号的压力。将身份验证消息定位到至少两天前首次打开应用的用户。
了解详情
使用上下文触发器安排消息推送
消息仅在用户正在使用您的应用时显示,并由特定事件触发,确保消息与用户相关且符合情境。
如果用户正在游戏中冲击高分榜,或者正在进行重要的购买,最好不要在此时推送消息分散用户的注意力。
例如,您可以为横幅消息使用如下推送配置:
- 将
level_up
事件设置为触发器,当用户在您的游戏应用中升级时,推送横幅消息来祝贺他们。
为横幅消息设置每台设备的推送频率限制,避免为用户推送垃圾消息:
- 将消息推送数量设置为每 15 天不超过一条,提醒用户更新应用。用户只需点击即可进入或向上滑动以忽略消息。
了解详情
跟踪应用的表现
您可以将 Firebase In-App Messaging 与 Google Analytics 相结合,剖析关于用户偏好和应用满意度的重要细节。
启用 Analytics 事件作为转化事件,并跟踪用户与消息的互动情况。例如:
- 使用模态模板的操作按钮为折扣商品提供促销信息。Firebase 可让您了解有多少用户收到了该消息、有多少用户点击了该消息,以及有多少用户完成了转化事件(如电子商务购买)。
利用回调为您的用户打造个性化体验。
- 使用模态模板灵活的对话框方向来处理重要的文本消息(例如服务条款更新)。跟踪哪些用户同意了您的服务条款,并使用回调将用户添加到 Analytics 受众群体,以实现更好的定位。
了解详情
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-17。
[null,null,["最后更新时间 (UTC):2025-08-17。"],[],[],null,["\u003cbr /\u003e\n\nEngage your audience in meaningful ways with modifications to the style,\ntargeting, and scheduling of your messages entirely through the [Firebase\nconsole](https://console.firebase.google.com/project/_/messaging).\nFirebase In-App Messaging offers message templates for you to experiment with and customize to\nyour liking.\n\nCustomize your message UI\n\nYou can style your messages with templates that are designed for creating\nengaging and clean user interfaces. Here are the available templates:\n\n| Message Template | Description |\n|------------------|-------------------------------------------------------------------------------------------------------------|\n| **Card** | - Structured message with two action buttons - Offers users a choice |\n| **Modal** | - Flexible message dialog with one action button - Only the message title is required --- use what you need |\n| **Image only** | - Upload your custom designed message - Easy to incorporate your aesthetics |\n| **Banner** | - Notification-like message - Doesn't take up a lot of screen space |\n\n\u003cbr /\u003e\n\n[Learn more about messaging templates](/docs/in-app-messaging/compose-campaign#style-and-content)\n\nUse the **Image only** message template, uploading your designed message to:\n\n- Incorporate the exact colors, fonts, and formatting that are tailored to your app's aesthetic and branding.\n- Offer a themed promotion. Send out your Halloween discount in a message with a custom scary font and background pattern. The entire message is clickable for the user to learn more or dismiss the message.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nWant even more freedom? Modify the display of Firebase's message templates\nthrough code.\n\n[Learn more](/docs/in-app-messaging/customize-messages)\n\nTarget specific users\n\nFor each campaign, you can target messages to certain audiences based on their\nbehavior, language, engagement, and more.\n\nConsider combining a **Card** message with [Firebase Dynamic Links](/docs/dynamic-links), configuring the targeting of the message to:\n\n- Target users with a **Last app engagement** between one to seven days to make sure they are active. Ask your engaged users if they are enjoying your app. Depending on their answer, deep link to Google Play for a review or survey their feedback.\n- Let users explore your social media app without pressures to register for an account. Target your authentication message at users that **First Open** your app at least two days ago.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n[Learn more](/docs/in-app-messaging/compose-campaign#target-your-users)\n\nSchedule messages with contextual triggers\n\nMessages only appear while users are in your app and are triggered by certain\nevents, ensuring that the messages stay relevant and contextual for your users.\nYou don't want to distract users who might be in the middle of a high-score-\nsetting game or an important purchase.\n\nFor instance, you can configure the scheduling of your **Banner** message to:\n\n- Congratulate users whenever they level up in your game app by setting a `level_up` event as a trigger.\n\nAvoid spamming your users by setting a per-device frequency limit for your\n**Banner** message to:\n\n- Gently remind users to update your app by setting the number of messages to no more than one message every 15 days. Users can easily click to engage or dismiss with a swipe up.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n[Learn more](/docs/in-app-messaging/compose-campaign#schedule-your-message)\n\nTrack your app's performance\n\nYou can combine Firebase In-App Messaging with [Google Analytics](/docs/analytics) to reveal\nimportant details about your users' preferences and satisfaction with your app.\n\nEnable Analytics events as conversions and track users' interactions with your\nmessages. For example:\n\n- Offer a promotional message with the **Modal** template's action button to discounted items. Firebase lets you know how many users received the message, how many clicked on it, and how many completed conversion event such as an e-commerce purchase.\n\nUtilize callbacks to create a personalized experience for your users.\n\n- Tackle important, text-heavy messages such as a terms of service update with the **Modal** template's flexible dialog orientation. Track which users consented to your terms of service and use callbacks to add users to an Analytics audience for better targeting.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n[Learn more](/docs/in-app-messaging/compose-campaign#conversion-events)"]]