# Assign Click Actions

Use this page to define what happens when a user clicks a web widget element.

This page focuses on behavior. If you are still building the widget layout, start with [Customize Components](https://user.netmera.com/netmera-user-guide/omnichannel-engagement/widgets/web-pop-up/create/customize-components). If you need help choosing the right element first, see [Widget Elements Reference](https://user.netmera.com/netmera-user-guide/omnichannel-engagement/widgets/web-pop-up/create/widget-elements-reference).

### Quick workflow

{% stepper %}
{% step %}

#### Select the interactive element

Click actions can be assigned to **Buttons** and **Images**.
{% endstep %}

{% step %}

#### Open the click action panel

Click the ⚡ **lightning** icon in the toolbar and choose the action you want.
{% endstep %}

{% step %}

#### Add conditions if needed

Use **Action Conditions** when the action should run only for a specific value or user choice.
{% endstep %}

{% step %}

#### Save and test

Preview the widget and test every path before saving.
{% endstep %}
{% endstepper %}

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FfQNooOdWybsGhuSzdbTq%2FScreenshot%202024-12-19%20at%2013.33.31.png?alt=media&#x26;token=99e69331-b396-4141-9e3c-9ef129261f3c" alt="" width="375"><figcaption><p>Click Actions</p></figcaption></figure>

### Click action types

#### User Update

Use **User Update** when a click should update profile data or user properties.

This is useful for saving form responses, updating user fields, or writing back preference data.

How to set it up:

1. Select the button or image.
2. Choose **User Update**.
3. Pick the field you want to update.
4. Map the value from a widget component if needed.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FO09ikrffVik7pxBg3eC1%2FScreenshot%202024-12-19%20at%2013.22.46.png?alt=media&#x26;token=35e4e66b-2b55-4ae3-88c8-3331bd2e742b" alt="" width="375"><figcaption><p>User Update</p></figcaption></figure>

{% hint style="success" %}

#### Matching components with attributes

To access subcategories of the target profile attribute:

* **Windows:** `CTRL + ALT + 7`
* **Mac:** `FN + Option + 7`
  {% endhint %}

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FIjxJS4e5WBmUGihxreNr%2FScreenshot%202024-12-19%20at%2013.11.24.png?alt=media&#x26;token=bc54a84b-1a34-484f-be84-9039bb25bde6" alt="" width="375"><figcaption></figcaption></figure>

**Example**

To update a user’s email through a button:

1. Assign an identifier to the button.
2. Select **User Update**.
3. Open the subcategory and choose the update method.
4. Select **Content** if the value comes from another widget component.
5. Match the content with the component you want to use, such as `emailattributebutton`.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FsL4w4nphWViwDQcUnJml%2FScreenshot%202024-12-19%20at%2013.14.27.png?alt=media&#x26;token=49aa67fc-91f3-4190-9430-cf1ff9468b10" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FXRUR4kVsmeVM8aZR0RpP%2FScreenshot%202024-12-19%20at%2013.22.23.png?alt=media&#x26;token=456e5941-a36a-45c9-a31d-0ccad831aebd" alt="" width="375"><figcaption></figcaption></figure>

#### Redirect to URL

Use **Redirect to URL** when a click should open a web page.

Best for external websites, landing pages, product pages, and campaign detail pages.

How to set it up:

1. Enter the destination URL.
2. Add a condition if the redirect should run only in a specific case.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FfvaQpUfNnqg1ZN62GN4t%2FScreenshot%202024-12-19%20at%2013.27.02.png?alt=media&#x26;token=6efed94b-4a5a-4706-86ab-21e1a63fad1f" alt="" width="375"><figcaption></figcaption></figure>

#### Go to View

Use **Go to View** to move users to another screen inside the same widget.

This is the main action for multi-step flows such as rating → thank you or form → success.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FiiRZzU7DN5HKykArvBGd%2FScreenshot%202024-12-19%20at%2013.26.14.png?alt=media&#x26;token=8ab474b6-162a-47d5-84b4-9c5b7652a50a" alt="" width="375"><figcaption></figcaption></figure>

How to set it up:

1. Choose **Go to View**.
2. Select the target view.
3. Add **Action Conditions** if the target should depend on user input.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FLK5w23HQpGaCdWilGel8%2FScreenshot%202024-12-19%20at%2013.37.43.png?alt=media&#x26;token=013400ea-aa31-4807-9e00-df03dec3cfd7" alt="" width="375"><figcaption></figcaption></figure>

#### Send Data

Use **Send Data** when the click should send form or interaction data to an endpoint.

This is useful for custom data collection and server-side workflows.

How to set it up:

1. Define the data or parameters to send.
2. Enter the endpoint URL.
3. Add conditions if the send action should be limited.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2F9j0AQxYz9UYnrOhJXe4P%2FScreenshot%202024-12-19%20at%2013.25.35.png?alt=media&#x26;token=739bec7e-1a13-41c1-850a-c216a7585b3a" alt="" width="375"><figcaption></figcaption></figure>

#### Close Widget

Use **Close Widget** when the interaction should simply dismiss the widget.

This works well for actions such as `Dismiss`, `Maybe later`, or `No thanks`.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FdL4A4BNR0FM9QfCzJa5X%2FScreenshot%202024-12-19%20at%2013.27.29.png?alt=media&#x26;token=587c1a2f-6270-418c-9591-a8b355ee03bd" alt="" width="375"><figcaption></figcaption></figure>

#### Open Widget

Use **Open Widget** when one widget should launch another widget.

This is useful for chained flows such as summary widget → detailed widget.

How to set it up:

1. Choose **Open Widget**.
2. Select the target widget.
3. Make sure the target widget already exists.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Fi0YtxhRsZD8TZn8wIjx5%2FScreenshot%202024-12-19%20at%2013.28.15.png?alt=media&#x26;token=729a75e3-f4f7-404d-be0d-b7143d962503" alt="" width="375"><figcaption></figcaption></figure>

#### Get Web Push Permission

Use **Get Web Push Permission** when the widget should request browser notification permission directly from the user.

This is useful during onboarding, subscription prompts, or well-timed opt-in requests.

How it works:

1. The user clicks the component.
2. The browser shows the native notification permission pop-up.
3. The user’s allow or deny response is reflected in Netmera automatically.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FO3dmIgwaMjIord69pK5u%2FScreenshot%202024-02-13%20at%2015.47.59.png?alt=media&#x26;token=9a5d2c8b-f52f-4d59-889d-b9d06562c6c0" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FlSC2mj8ETWN1ahyoVpYN%2FScreenshot%202024-02-13%20at%2015.54.08.png?alt=media&#x26;token=b900a9da-2733-45c4-93bb-a1cd8a1a94ee" alt="" width="563"><figcaption><p>Widget shown to users</p></figcaption></figure>

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FblX3XvGPc8HlF0HvE0J7%2FScreenshot%202024-02-13%20at%2015.54.41.png?alt=media&#x26;token=69527732-c313-4a68-a808-bc85cfe14bea" alt="" width="563"><figcaption><p>Native permission pop-up</p></figcaption></figure>

#### Fire Event

Use **Fire Event** when a click should trigger a custom event inside your app or tracking setup.

This is useful when another workflow, report, or integration depends on the interaction.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FmPIsmo3WgNDQI0GmyEfe%2FScreenshot%202024-12-19%20at%2017.35.54.png?alt=media&#x26;token=722b1e3d-5215-45d6-b76c-1cabc392869b" alt="" width="375"><figcaption></figcaption></figure>

How to set it up:

1. Create the event first in [Create Custom Events](https://user.netmera.com/netmera-user-guide/customer-data/events/create-custom-events).
2. Assign **Fire Event** to the button or image.
3. Select the event from the list.

{% hint style="success" %}

#### Matching widget components with events

To access subcategories:

* **Windows:** `CTRL + ALT + 7`
* **Mac:** `FN + Option + 7`
  {% endhint %}

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FfCN8P0hyMQKJE2zaZD18%2FScreenshot%202024-12-19%20at%2014.04.33.png?alt=media&#x26;token=a6fc6f95-c1e7-4e70-9398-eaa3441c7e3c" alt="" width="375"><figcaption></figcaption></figure>

**Example**

To fire an event from an image click:

1. Assign an identifier to the image.
2. Select **Fire Event**.
3. Open the subcategory and choose the method.
4. Select **Content** if the mapping comes from a widget component.
5. Match the event with the right component, such as pairing `LikeEvent` with the image identifier.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Fkw7AfP8WawNktnBLN4r0%2FScreenshot%202024-12-19%20at%2013.57.52.png?alt=media&#x26;token=21d71568-fbec-4e81-8304-8b69a1def807" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2F31w8pKc9wynViOmZYeKu%2FScreenshot%202024-12-19%20at%2014.03.58.png?alt=media&#x26;token=4eb34ff9-901d-48b6-b97b-0b0b0d2dd01b" alt="" width="375"><figcaption></figcaption></figure>

#### Deep Link

Use **Deep Link** when the click should open a specific destination inside the app.

This is useful for product pages, article detail pages, feature screens, or campaign destinations.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Fu1EoWUbqXx44gg2QOQzV%2FScreenshot%202023-06-12%20at%2015.26.33.png?alt=media&#x26;token=e3423c8a-8871-4d76-8581-1f835be4cc71" alt="" width="375"><figcaption></figcaption></figure>

### Validations

Validations help you prevent bad or incomplete input before an action runs.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FDdCv2zhYFMYuk68Xuc3c%2FScreenshot%202024-12-19%20at%2016.59.38.png?alt=media&#x26;token=90039e65-7a7d-4ddf-8d46-934e2b0b29c0" alt="" width="563"><figcaption></figcaption></figure>

#### Example

If a field must not be empty, set the rule to **Not Empty** and write an error message such as `Please fill in.`

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FxTMCjMP0GtbPtVJVghdt%2FScreenshot%202024-12-19%20at%2016.08.52.png?alt=media&#x26;token=a3e12b40-b62f-41c1-a2c0-ca0f3480c020" alt="" width="563"><figcaption></figcaption></figure>

#### Validation rules

Available rules include **Not Empty**, **String Length**, **Number**, **Percentage**, and **Regex**.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2F0CmOqj0wUlaIWJ8gzBlO%2FScreenshot%202024-12-19%20at%2016.04.00.png?alt=media&#x26;token=2ad71c2b-0009-449c-bec9-f14c2d1a01a6" alt="" width="375"><figcaption></figcaption></figure>

#### Email validation

Widgets support email validation with custom error messages such as *Please enter a valid email address.*

If the value is invalid and the user clicks submit, the error appears immediately and the action is blocked.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FR1WaRx1J7FZ4ehqOxPj2%2FFrame%2091581.png?alt=media&#x26;token=53a3508b-f2ed-4c0a-9f12-4c86075b251d" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %}

#### Important step

Do not forget **Check Form Validations Before Performing This Action**.

This ensures that all validation rules run before the click action is executed.
{% endhint %}

### Check Form Validations Before Performing This Action

When enabled, the widget checks validations first. If validation passes, the action runs. If validation fails, the action is blocked and the user sees the related error message.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FcYaWj2Seq0PhZE6L75L1%2FScreenshot%202024-12-19%20at%2016.22.24.png?alt=media&#x26;token=98bca2c3-b746-4b5b-a6d7-68aa8605d3f4" alt="" width="375"><figcaption></figcaption></figure>

### Manage App

Use **Manage App** when the action should be handled by the app itself. This is commonly needed for app-level deep link behavior.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FV1dNLSVvKZlsdljWFeaG%2FScreenshot%202024-12-19%20at%2016.40.10.png?alt=media&#x26;token=93947740-9ca3-4bd7-b45c-95a6e7b8f60b" alt="" width="375"><figcaption></figcaption></figure>

### Action Conditions

Use **Action Conditions** to control when a click action should run.

How it works:

1. Choose the identifier to evaluate.
2. Select the condition.
3. Enter the expected value.
4. Run the action only when the condition is matched.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FHnsurFMqDbTrPPEJvfrd%2FScreenshot%202024-12-19%20at%2017.04.58.png?alt=media&#x26;token=2f7c68af-4f70-43a6-9963-0ffe1e333d19" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2F4SpS3hQnIAmNqWAvoOOh%2FScreenshot%202024-12-19%20at%2017.11.04.png?alt=media&#x26;token=5cb47ace-5876-483a-80bb-fec96eb1092f" alt="" width="375"><figcaption></figcaption></figure>

### Example scenario: rating flow

This example creates a simple feedback flow with conditions.

{% hint style="success" %}

#### Goal

Ask for a 5-star rating. Users who rate **4-5** go to a **Thank You** page. Users who rate **1-3** go to a **Feedback** page.
{% endhint %}

#### Step 1: Add the rating element and identifiers

Design the widget first. Add the rating element and the button users will click after rating.

Then assign a clear identifier to the rating element, such as `rating`.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Ffr6fRRDPSuvgcCCyD3nr%2FScreenshot%202023-05-25%20at%2017.21.29.png?alt=media&#x26;token=84b913f7-44a3-40ad-a68a-1000f1a233c9" alt=""><figcaption><p>Identifiers</p></figcaption></figure>

{% hint style="info" %}
Identifiers are usually shown at the top-right of the selected component. Replace random defaults with clear names before you start action setup.
{% endhint %}

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FteNAlD5Y2rMeID7bwMKd%2FScreenshot%202023-05-25%20at%2017.22.21.png?alt=media&#x26;token=e0ddbdd6-dee1-4e4c-afb3-c7a78f9f050f" alt="" width="563"><figcaption><p>Identifiers</p></figcaption></figure>

#### Step 2: Create the views

Add the extra views needed for the flow:

* **View 2:** Feedback
* **View 3:** Thank You

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FGPYd4Z8Ix5av5yeM2cpP%2FScreenshot%202023-05-25%20at%2017.46.29.png?alt=media&#x26;token=2820239c-c202-45dc-9b87-39991923809f" alt=""><figcaption><p>View 2</p></figcaption></figure>

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2F4KBkOeNVVQR71BxH7UZK%2FScreenshot%202023-05-25%20at%2017.46.56.png?alt=media&#x26;token=94dc62e7-6ce7-4eff-9fca-6608fa8af91c" alt=""><figcaption><p>View 3</p></figcaption></figure>

#### Step 3: Add conditional actions to the button

Add two **Go to View** actions to the same button.

First action:

* choose **Go to View**
* select **View 2**
* add the condition `rating <= 3`

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Fvcav0QZ41Dc0accgzT18%2FScreenshot%202023-05-25%20at%2017.25.27.png?alt=media&#x26;token=194bfda8-de17-4fa8-9524-46ca689c000d" alt=""><figcaption><p>Action 1</p></figcaption></figure>

Second action:

* click **+ Add Action**
* choose **Go to View**
* select **View 3**
* add the condition `rating >= 4`

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Fi7nMKpIGB0h7XBtsGXof%2FScreenshot%202023-05-25%20at%2017.39.20.png?alt=media&#x26;token=b2751707-13a8-4276-ab7c-30d0440128c4" alt=""><figcaption><p>Action 2</p></figcaption></figure>

You can add more actions later if the flow needs data send, redirect, or event trigger steps.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FRn2fMSvLlkt2i661Llvp%2FScreenshot%202023-05-26%20at%2013.20.31.png?alt=media&#x26;token=acbd4c3f-7908-4775-b434-6d164c4ae1eb" alt=""><figcaption><p>Select Action</p></figcaption></figure>

After testing the logic, click **Save Widget and Return**.
