5 月 14 日開催の Google I/O で Firebase の最新情報をお届けします。
今すぐご登録ください。
キャンペーンを作成する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
始める前に
スタートガイドの手順を完了して、Firebase が有効になっているアプリを準備し、最新の Firebase In-App Messaging SDK を追加している必要があります。
新しいキャンペーンを作成する
Firebase コンソールの [メッセージング] ページで、新しいキャンペーンを設定します。
- 初めて使用する場合は、[最初のキャンペーンを作成] をクリックします。
- それ以外の場合は、[新しいキャンペーンを作成] をクリックします。
ステップ 1: スタイルとコンテンツ
コンソールで Firebase In-App Messaging メッセージ テンプレートを使用して、アプリ内メッセージでさまざまな機能を組み込むことができます。
メッセージ テンプレートのスタイル設定の例については、ユースケースをご覧ください。
メッセージ テンプレート タイプ |
機能 |
機能の説明 |
カード |
モーダル |
画像のみ |
バナー |
lens |
lens |
lens |
lens |
画像 |
HTTPS 画像 URL を指定します。Firebase Hosting を使用して画像をホストできます。 |
lens |
lens |
lens |
lens |
アクション |
ウェブリンクやディープリンクを使用して、ユーザーを外部ページまたはアプリ内の特定のページに誘導します。ディープリンクの作成と管理は Firebase Dynamic Links で行います。モーダルと画像のみのテンプレートには、メッセージを閉じる X ボタンが含まれています。 |
lens |
lens |
|
lens |
テキスト / 背景色 |
16 進のカラーコードを入力するか、カラー グラデーションを使用して、ブランドに合った特定の色合を指定し、メッセージのビジュアルをカスタマイズします。 |
lens |
lens |
|
lens |
メッセージのタイトル / 本文 |
ユーザーの注意を引くように、関連するヘッダーや簡潔な説明を追加します。Firebase は、ユーザーに合わせてテキストを自動的に翻訳し、スケーリングします。 |
lens |
lens |
|
|
プライマリ ボタン |
デフォルトのボタン操作は、メッセージを閉じるように設定されています。操作としてユーザーをリダイレクトする URL を指定します。 |
lens |
|
|
|
第 2 ボタン |
デフォルトのボタン操作は、メッセージを閉じるように設定されています。操作としてユーザーをリダイレクトする URL を指定します。 |
Firebase コンソールの [キャンペーンの作成] ウィンドウで、テンプレートで使用可能な機能を使用してメッセージをカスタマイズします。
[キャンペーンの作成] ウィンドウの右側で、メッセージをプレビューできます。メッセージは、スマートフォンまたはタブレットに合わせて横向きまたは縦向きで表示されます。
このコンソール内のプレビューは、メッセージがモバイル デバイス上でおおよそどのように表示されるかを示すものです。実際のメッセージの表示はデバイスによって異なります。実際の結果を確認するには、実物のデバイスでテストします。
必要に応じて、キャンペーンのカスタム メタデータを定義します。このメタデータは、ユーザーにキャンペーンを表示するときに、SDK コールバックを使用してクライアント側で使用できます。たとえば、クライアントで使用できるプロモーション コードを使用してキャンペーンにタグを設定できます。
ステップ 2: ユーザーをターゲットにする
キャンペーンの名前を入力します。
この名前は、キャンペーンのレポートに使用されますが、表示されるメッセージでは使用されません。
(省略可)キャンペーンの説明を入力します。
この説明はキャンペーンのレポートに使用されますが、表示されるメッセージでは使用されません。
[Select app] プルダウンをクリックして、このキャンペーンに関連付けるアプリを指定します。
(省略可)[and] ボタンをクリックして、ターゲット ユーザーをさらに絞り込みます。
[Select] プルダウンを使用して、追加の仕様を選択します。
このキャンペーンの対象となるユーザーの割合を表示します。
この数値は、過去 7 日間にサービスにアクセスしたアクティブ ユーザー数に基づいて計算されます。トリガー条件が発生した場合、このメッセージが対象ユーザーにのみ表示されます。
(省略可)アプリが複数の言語のユーザーをターゲットにしている場合は、キャンペーンをそれらの言語でローカライズするように求められます。ダイアログを使用して独自の翻訳を追加するか、Google 翻訳を使用してキャンペーンをローカライズします。
ステップ 3: メッセージをスケジューリングする
キャンペーンの開始日時を入力します。
キャンペーンを開始するには、キャンペーンを公開するか、開始予定日を設定します。
キャンペーンの終了日時を入力します。
キャンペーンは無期限にすることもできます。また、エンドポイントをスケジューリングすることもできます。
イベントの [+] をクリックして、1 つ以上のトリガー イベントを追加します。
デバイスごとに頻度制限を指定します。この制限により、ユーザーにメッセージを表示する頻度を制御できます。
- デフォルトでは、ユーザーによって一度インプレッション(表示)されたキャンペーンは、それ以降そのユーザーに対して表示されません。
- メッセージの頻度は日数で設定することもできます。
ステップ 4: コンバージョン イベント(省略可)
Firebase は、コンバージョン イベントが完了したインプレッション数を記録します。
[キャンペーンの作成] ウィンドウで、[コンバージョン イベントを選択できます] プルダウンで次のいずれかを選択します。
キャンペーンを公開したら、[メッセージング] ページに移動します。キャンペーン名をクリックして、キャンペーンのコンバージョン履歴データを表示します。
キャンペーンを公開する
キャンペーンの変更後、[下書き保存] をクリックすると、キャンペーンが下書き状態に戻り、編集できる状態になります。
[公開] をクリックして、予定日にターゲット ユーザーへメッセージを配信できます。キャンペーンは公開後に編集できます。
公開済みのキャンペーンを停止すると、再度公開できなくなります。ただし、実行中のキャンペーンはいつでも停止または編集できます。また、キャンペーンを一から作成しなくても、既存のキャンペーンを複製してバリエーションを作成することもできます。
Gemini in Firebase でメッセージ キャンペーンの AI 分析情報を取得する
Gemini in Firebase は、Firebase Cloud Messaging キャンペーンと In-App Messaging キャンペーンのパフォーマンスを改善するための、メッセージ キャンペーンの要約、分析情報、ガイダンスを提供します。Gemini in Firebase は、キャンペーン データを分析してキャンペーンのリーチと影響を把握し、ユーザー エンゲージメントと成長を促進するための戦略を提案します。
メッセージ キャンペーンの AI 分析情報にアクセスする
メッセージ キャンペーンの AI 分析情報を使用するには、プロジェクトに以下が該当することを確認してください。
プロジェクトで Gemini in Firebase が有効になっている。詳しくは、Gemini in Firebase を設定するをご覧ください。
Firebase プロジェクトで Firebase Cloud Messaging または In-App Messaging が有効になっている。
少なくとも 1 つのキャンペーンが存在して Firebase コンソールに表示されている。
これらの要件を満たしていることを確認したら、次の手順を行います。
Firebase コンソールで [メッセージ] を開き、キャンペーン データにアクセスします。
キャンペーン データが読み込まれたら、[Generate AI insights] をクリックします。
メッセージ キャンペーンのサマリーと分析が表示されます。
料金
詳細については、Gemini in Firebase の料金をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-17 UTC。
[null,null,["最終更新日 2025-08-17 UTC。"],[],[],null,["\u003cbr /\u003e\n\nBefore you begin\n\nMake sure you complete the steps in [Get\nStarted](/docs/in-app-messaging/get-started) to\nensure you have an app with Firebase enabled and have added the latest Firebase In-App Messaging\nSDK.\n\nCreate a new campaign\n\nSet up your new campaign in the Firebase console's\n[Messaging page](https://console.firebase.google.com/project/_/messaging).\n\n- If you are a first time user, click **Create your first campaign**.\n- If not, click **New campaign**.\n\nStep 1: Style and content\n\nIn the console, use Firebase In-App Messaging message templates to incorporate different\nfeatures to serve different purposes with your in-app messages.\n\n[Explore use cases](/docs/in-app-messaging/explore-use-cases) to see\nexamples for stylizing the messages templates.\n\n\n| Message Template Type |||| Feature | Feature Description |\n| Feature | Feature Description |\n|---------|---------------------|------------|--------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Card | Modal | Image only | Banner |\n| lens | lens | lens | lens | Image | Provide an HTTPS Image URL. You can use [Firebase Hosting](/docs/hosting) to host your images. |\n| lens | lens | lens | lens | Action | Use weblinks or deep links to send your users to external pages or specific pages in your app. You can use [Firebase Dynamic Links](/docs/dynamic-links) to create and manage deep links. Templates **Modal** and **Image only** include an X button, allowing users to dismiss the message. |\n| lens | lens | | lens | Text/background color | Customize the message visuals by entering the Hex Color Code or using the color gradient to find the specific hue that matches your brand. |\n| lens | lens | | lens | Message title/body | Catch your user's attention with a relevant header and a concise description. Firebase automatically translates and scales your text to accommodate your users. |\n| lens | lens | | | Primary button | The default button action is set to dismiss the message. Provide a URL to redirect users as the action. |\n| lens | | | | Secondary button | The default button action is set to dismiss the message. Provide a URL to redirect users as the action. |\n\n\u003cbr /\u003e\n\n1. In Firebase console's **Compose campaign** window, customize your\n message to your liking with the features available to each template.\n\n2. On the right-hand side of the **Compose campaign** window, preview your message\n in landscape or portrait orientation for a phone or tablet device.\n\n The in-console preview provides a general idea of how your message appears\n on a mobile device. Actual message rendering varies depending on the device.\n [Test with a real device to see the exact rendering](/docs/in-app-messaging/get-started#send_a_test_message).\n3. If desired, define custom metadata for your campaign. This metadata will be available\n on the client side using SDK callbacks when a campaign is displayed to a user.\n For example, you might want to tag the campaign with a promo code that\n you can use on the client.\n\nStep 2: Target your users\n\n1. Enter a name for your campaign.\n\n This name is used for campaign reporting and is not part of the visible\n message.\n2. (Optional) Provide a campaign description.\n\n This description is used for campaign reporting and is not part of the visible\n message.\n3. Click on the **Select app** dropdown and identify which\n app you want to associate with this campaign.\n\n4. (Optional) Click the **and** button to further narrow down your\n target users.\n\n Use the **Select** dropdown to choose additional specifications.\n5. View the percentage of potential users that are eligible for this\n campaign.\n\n This number is estimated based on active users who contacted the service\n in the last 7 days. Eligible users only see this message if a trigger\n condition occurs.\n6. (Optional) If your app targets users in multiple languages, you will be\n prompted to localize the campaign in those languages. Use the dialog to\n either add your own translations or use Google Translate to localize the\n campaign easily.\n\nStep 3: Scheduling your message\n\n1. Describe a start date and time for your campaign.\n\n Your campaign can start when you publish the campaign or have a scheduled\n start.\n2. Describe an end date and time for your campaign.\n\n Your campaign can run indefinitely or have a scheduled endpoint.\n3. Click Event + to add at least one trigger event.\n\n - You can enter default events or [events logged through Firebase Analytics](/docs/analytics/android/events) to trigger your in-app message. These events can be user actions, system events, or errors.\n - Your in-app message is triggered when any of your events occur.\n4. Specify your per-device frequency limit. The limit allows you to\n control how often your users see your message.\n\n - By default, a campaign is not shown after it has been viewed by (that is, impressed on) the user once.\n - Or, you can set the frequency of messages in days.\n\nStep 4: Conversion events (optional)\n\nFirebase tracks the number of impressions that result in a completed conversion\nevent.\n\n1. In the **Compose campaign** window, use the **Select conversion event**\n dropdown to choose from:\n\n - The default conversion events.\n - Any [events you enabled as conversions](https://support.google.com/firebase/answer/6317522#enable).\n2. After you publish the campaign, go to the\n [Messaging page](https://console.firebase.google.com/project/_/messaging)\n and click on the campaign's name to see data related to the\n campaign's conversion history.\n\nPublishing your campaign\n\nAfter modifying your campaign, you can click **Save as draft** for the option to\nreturn and edit the campaign in draft status.\n\nOr, you can click **Publish** to release your message to targeted users on the\nscheduled date. You can edit your campaign after it has been published.\n\nOnce you stop a published campaign, you will not be able to publish it again.\nHowever, you may stop or edit a running campaign at any time. You can also\nduplicate an existing one to make slight variations and avoid creating a\ncompletely new campaigns.\n\nGet AI insights for messaging campaigns with Gemini in Firebase\n\nGemini in Firebase\nprovides messaging campaign summarization, insights,\nand guidance to improve your Firebase Cloud Messaging and In-App Messaging\ncampaign performance. By analyzing campaign data,\nGemini in Firebase can help you understand your campaigns' reach and impact\nand suggests strategies to improve user engagement and growth.\n\nAccess AI insights for messaging campaigns\n\nTo use messaging campaign AI insights, make sure that your project has the\nfollowing:\n\n- Gemini in Firebase is enabled for your project. Learn more at\n [Set up Gemini in Firebase](/docs/gemini-in-firebase/set-up-gemini).\n\n- Firebase Cloud Messaging or In-App Messaging is enabled in your Firebase\n project.\n\n- At least one campaign exists and appears in the Firebase console.\n\nAfter ensuring these requirements are met:\n\n1. Open [**Messaging**](//console.firebase.google.com/project/_/messaging) in the\n Firebase console to access campaign data.\n\n2. After your campaign data loads, click **Generate AI insights**.\n\n A summary and analysis of your messaging campaigns appears.\n\nPricing\n\nSee\n[Gemini in Firebase pricing](/docs/gemini-in-firebase#pricing) for more\ninformation."]]