> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifly.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Test your integration

> Verify your Notifly Client SDK integration by testing user registration, events, app push notifications, in-app popups, and web push notifications.

Follow these tests to verify that your Notifly Client SDK integration works.

## 1. Register a user and send events

### 1. Set the user ID

The SDK creates an anonymous user if you do not set a user ID. Call `setUserId` with the ID your app uses for that user so Notifly can identify them consistently.

### 2. Set user properties

Call `setUserProperties` to set the user's properties.

### 3. Send events

* Use the Notifly SDK's `trackEvent` method to send user actions, such as page views and clicks, as events.

## 2. Verify the user and events

1. Sign in to [Notifly](https://notifly.tech/).
2. In the upper-right corner, check that the selected development or production project contains the test user.
3. Go to **User Management** > **User List**.
4. Select the test user and check the following on the user profile page.
   * The user ID is registered.
   * User properties such as `$email` and `$phone_number` have the expected values.
   * The event log contains the events that you sent.

**Example user list**

![User list](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/user-list.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=93275763cc2f68f0d59b2e87e3ef6e34)

**Example user profile**

![User profile](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/user-page.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=63956ec25ee67cf958eb833435a65c6a)

**Example event log**

![User event log](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/user-event-list.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=ff7f999b9a7bf89941a3b71eee02a7ff)

## 3. Test app push notifications

> [!WARNING]
>
> If you are testing push notifications on iOS, use a physical device.

1. In the console, open the campaign creation page.
2. In the tabs in the upper-right corner, select the project that contains the test user.
3. Under **Basic Information and Channel**, select **App Push**.
4. Under **Message and Action**, write the push message.
   * Enter the notification title in **Message Title**.
   * Enter the notification text in **Message Content**.
   * Under **Action**, enter the URL or deep link to open when the user taps the notification.
     * Test the tap action when the app is in the foreground, in the background, and terminated.

![App push message settings](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/push-test-content.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=98c807c95dad61ea193002c08759d1af)

5. Click **Send Test** in the lower-right corner. In the **Test Send** dialog, enter the test user ID under **Recipients** and click **Send**.

The device images below illustrate how an app push, an in-app popup, and a web push can appear.

![Illustration of an app push test notification](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/push-test-result.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=ce5071955ae1c370dd4edf5f9382b30a)

The test is complete when the device receives the push notification.

## 4. Test in-app popups

Notifly automatically logs internal events such as `notifly__session_start`. Use this event to test whether an in-app popup appears.

### 1. Create an in-app popup template

1. Open the in-app popup editor.
2. Select a template and configure **Image**, **Text**, **Button**, and **Design**.
   * In **Button**, you must enter the destination link for `main_button`.

![Create an in-app popup template](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-create-template.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=c237a9891e9fa0c4114ef7a140614449)

3. Click **Save**, enter a template name, and save the template.

![Save an in-app popup template](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-save-template.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=2354c589cbe91da0000f343693461443)

### 2. Create a test campaign

1. Open the campaign creation page.
2. Select the development or production project that contains the test user.
3. Under **Basic Information and Channel**, configure the following.
   * Enter a campaign name.
   * Select **In-App Popup** as the channel.
4. Under **Delivery Timing**, configure the following.
   * Select **Event-Based Send**.
   * Turn on **Send Indefinitely**.
   * Enter `notifly__session_start` as the event.
   * Under **Delay After Event Occurrence**, select **Immediately after event occurrence**.

![Campaign basics and send time](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-section1and2.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=e06993ceee4e3a0ce234c4e9768d244e)

5. Under **Delivery Target**, enable **Test Mode** and enter the test user ID.

![Campaign test mode](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-section3.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=aa194fc7495f97b18c1a55d7d814d88a)

6. Under **Message and Action**, select the in-app popup template that you created in step 1.

![Campaign message and action settings](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-section4.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=2a8b0b7b5e43729dc5fbdc2a640a6d58)

![Select an in-app popup template](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-select-template.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=a8a9edc2a85d159a11fe7608b394a2c2)

7. Review the final settings and create the campaign.

![Review and create the campaign](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-campaign-review.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=87358b124435e77930724baf533a3af2)

### 3. Check the message on the test device

1. Fully terminate the app on the device registered with the test user ID.
2. Open the app to trigger `notifly__session_start`.
3. Check that the in-app popup appears.

![Illustration of an in-app popup on a test device](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/in-app-message-test-show-popup.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=585297cf032405d1ab7c73f3588bcf57)

If the message does not appear immediately, the new campaign may still be syncing. Restart the app and check again.

The in-app popup test is complete when the message appears.

## 5. Test web push notifications

### 1. Send a test message

1. In the console, open the campaign creation page.
2. In the tabs in the upper-right corner, select the project that contains the test user.
3. Under **Basic Information and Channel**, select **Web Push**.
4. Under **Message and Action**, write the push message.
   * Enter the notification title in **Message Title**.
   * Enter the notification text in **Message Content**.
   * Under **Action**, enter the URL to open when the user clicks the notification.
     * Test both the foreground and background states.

![Web push message settings](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/web-push-test-content.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=b77c4b6bdd46b1f1102f5db5383e37de)

5. Click **Send Test** in the lower-right corner. In the **Test Send** dialog, enter the test user ID under **Recipients** and click **Send**. The console displays “Test send completed successfully.”

![Illustration of a web push test notification](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/integration-test/web-push-test-result.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=e2fb5078bab8933b6155fc47cd195e1c)

The test is complete when the browser receives the web push notification.

### 2. Troubleshoot delivery

If web push notifications do not arrive, check these common causes.

> [accordion] Device permissions
>
> On macOS and Windows, allow notifications for the browser in the operating system settings.
>
> Example on macOS.
>
> ![Browser notification permissions in macOS settings](https://mintcdn.com/notifly/umP8GQfcNYrXNUqj/ko/developer-guide/image/macOS_notification_settings.png?fit=max\&auto=format\&n=umP8GQfcNYrXNUqj\&q=85\&s=85361bc9f18a566a6b3ce947566c1459)

> [accordion] Browser permissions
>
> Browsers request notification permission differently. Check that notifications are allowed.
>
> Example in Chrome.
>
> ![Notification permission allowed in Chrome](https://mintcdn.com/notifly/QWigoXWbDguqzkH4/ko/developer-guide/image/chrome-granted-example.png?fit=max\&auto=format\&n=QWigoXWbDguqzkH4\&q=85\&s=852a2800cc5cbc4020956ec3d60f875c)
>
> Example in Edge.
>
> ![Notification permission blocked in Edge](https://mintcdn.com/notifly/QWigoXWbDguqzkH4/ko/developer-guide/image/edge-blocked-example.png?fit=max\&auto=format\&n=QWigoXWbDguqzkH4\&q=85\&s=0ed81d601e249bf4119c2d8da60ed211)
>
> The browser's permission prompt may not appear automatically, depending on your Notifly JavaScript SDK configuration. For details, see [Register a Service Worker in the JavaScript SDK guide](https://docs.notifly.tech/en/developer-guide/javascript-sdk.md).

> [accordion] Browser version
>
> #### Browser version
>
> Notifly uses the Web Push Protocol. See [Push API browser compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Push_API) for supported browsers.
>
> For example, desktop Safari 15 and earlier do not support standards-based web push notifications.

Contact the Notifly team if you have other questions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.