# モーダルを表示する

クイックスタートへようこそ！

{% hint style="info" %}
SDKのインストールがまだの方は、最初に下記を参考の上、作成をお願いします。

<https://docs.nativebrik.com/start/install>
{% endhint %}

ここからは、日常的に使用するNubrickの使い方を紹介します。まずは、モーダル（アプリ内メッセージ）を作成し、ユーザーに新しい機能を通知する方法を学びます。

{% hint style="success" %}
このセクションで学ぶこと

アプリ全体のうち10%のユーザーに向けて、新しい機能を通知するモーダル（アプリ内メッセージ）を作成できるようになる。
{% endhint %}

***

### Step 1. やりたいことを思い浮かべる <a href="#step-1-design-what-you-want-to-do" id="step-1-design-what-you-want-to-do"></a>

ここでは、アプリの新しい機能をユーザーに知らせたいと仮定します。この目的のために、アプリ内メッセージを使ってユーザーに通知する方法を検討します。メッセージの内容は次のようにデザインします：

* 新機能のお知らせ
  * 「新機能が追加されました！」というメッセージ
  * 「今すぐチェック」などのボタン

<figure><img src="/files/nIQkRuWtZLoNbPJhxL7b" alt="" width="188"><figcaption></figcaption></figure>

また、すべてのユーザーにメッセージを表示するのではなく、10%のユーザーに表示するように設定します。これにより、メッセージの効果を小さなユーザーグループでテストし、必要に応じて改善を加えることができます。

***

### Step 2. エクスペリメントを作成・設定する <a href="#step-2-create-and-configure-an-experiement" id="step-2-create-and-configure-an-experiement"></a>

ログイン後、ダッシュボードページにアクセスし、以下の手順に従ってエクスペリメントを作成します。

1. **「エクスペリメント」ページに移動**します。
2. **「新規作成」ボタン**をクリックし、「アプリ内メッセージ」を選択します。
3. エクスペリメント設定ページが表示されるので、以下の設定を行います：
   * エクスペリメント名に「新機能のお知らせメッセージ（10%のユーザー）」と入力
   * トリガーを「一度だけ」に設定し、「アプリ起動時」を選択
   * 配信割合を「10%」に設定

<figure><img src="/files/JL9dTydeGFPLr7dpXj5X" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/tdFizGMg27ZS08Lodc0G" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mPEAv70rjedlfso7H3mA" alt=""><figcaption></figcaption></figure>

次に、`「バリアント」`の「モーダルを新規作成」をクリックし、メッセージのデザインを行います。

<figure><img src="/files/Mk407sjTFmqHyYRBJZwC" alt=""><figcaption></figcaption></figure>

最後に、「Confirm」ボタンをクリックしてデザインを保存し、「保存」ボタンをクリックして設定を完了します。

<figure><img src="/files/g28oc4tl429Oro5SH4NA" alt=""><figcaption></figcaption></figure>

***

### Step 3. エクスペリメントを実行する <a href="#step-3-run-the-experiment" id="step-3-run-the-experiment"></a>

エクスペリメント設定ページに戻ると、作成したエクスペリメントの設定内容とそのアナリティクスが表示されます。

<figure><img src="/files/wAAYPGqwbPUScr4g8sg8" alt=""><figcaption></figcaption></figure>

**「配信する」ボタン**をクリックすると、エクスペリメントが開始され、数秒後にアプリに反映されます。

***

### Step 4. iOS/Androidアプリで確認する <a href="#step-4-check-it-on-your-iosandroid-app" id="step-4-check-it-on-your-iosandroid-app"></a>

エクスペリメントが反映されたら、実際にiOSまたはAndroidのアプリでメッセージが表示されるか確認します。アプリを起動すると、新機能のお知らせモーダルが表示されるはずです。

<figure><img src="/files/JKBV3f378pZV1TdGKoFf" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nubrick.app/start/quickstart-1/modal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
