# Actions in the WYSIWYG editor

Associate actions with the buttons, images, and links in your messages.

When using the WYSIWYG editor for email, [Rich Pages](https://www.airship.com/docs/reference/glossary/#rich_page), and [In-App Automation](https://www.airship.com/docs/reference/glossary/#iaa), you can assign an action that occurs when a user taps a button, link, or image in the message. You can also use [Handlebars](https://www.airship.com/docs/reference/glossary/#handlebars) to personalize the actions.

## Configuring actions

Configuring actions for links is the same for all text in the WYSIWYG editor. Configuring actions for images and buttons differs for app and email content.

### Buttons and images: App

Follow these steps to configure actions for buttons and images in landing page, Message Center, and In-App Automation content.

![Configuring an action for an app button or image](https://www.airship.com/docs/images/wysiwyg-message-actions_hu_9c9e605ad88a410f.webp)

*Configuring an action for an app button or image*

1. Select a button or image in your app content, then configure Action in the sidebar.
1. Select and configure an [action](#app-actions).
1. (Optional) Enter an event name to differentiate the clicks for the button.

   By default, the total clicks for all buttons and images in the message are reported using [Custom Event](https://www.airship.com/docs/reference/glossary/#custom_event) `ua_button_tap`. You can enter your own event name instead. This name is appended to the default. For instance, if you enter `Cat socks55`, the event name in reporting will be `ua_button_tap-Cat socks55`.

   Event names also support [Handlebars](https://www.airship.com/docs/reference/glossary/#handlebars).

1. (Optional for [landing pages](https://www.airship.com/docs/guides/messaging/messages/content/app/landing-pages/) only) Check the *Landing page behavior* box if you want the landing page to close after the selected action occurs. When the user reopens your app, the landing page will no longer be open.

1. (Optional) Add or remove tags when a user taps the notification:
   1. Click **Configure options**.
   1. Select *Add* or *Remove*, then search for tags that exist in the system or create a new tag.

   Click **Configure another option** to add more tags.

### Buttons and images: Email

Follow these steps to configure actions for buttons and images in email content.

![Configuring an action for an email image](https://www.airship.com/docs/images/wysiwyg-actions-image-email-open-website_hu_e5f0bad274cf18a.webp)

*Configuring an action for an email image*

1. Select a button or image in your email content, then configure Action in the sidebar.

1. Select and configure an [action](#email-and-link-actions).

### Links

Follow these steps to add links in Heading and Text elements in app and email content.

1. Select text in your message and click the Link  option.
   ![Selecting the Link option for text](https://www.airship.com/docs/images/wysiwyg-text-link_hu_af34ec005ab9389e.webp)
   
   *Selecting the Link option for text*
1. Select and configure an [action](#email-and-link-actions).
   ![Selecting the Link option for in Text content](https://www.airship.com/docs/images/wysiwyg-link-open-website_hu_b1628c7c1b202883.webp)
   
   *Selecting the Link option for in Text content*
1. Click **Save**.

## App actions for buttons and images {#app-actions}

Supported actions for app buttons and images.

| Action  | In-App Automation | Landing page and Message Center |
| --- | :---: | :---: |
| Adaptive Link | &#10003; | &#10003; |
| App Rating | &#10003; | &#10003; |
| Deep Link | &#10003; | &#10003; |
| Dismiss Message | &#10003; |  |
| Preference Center | &#10003; | &#10003; |
| Push Opt-in | &#10003; |  |
| Share | &#10003; | &#10003; |
| Web Page | &#10003; | &#10003; |

### Adaptive link

<p><em>Adaptive Link</em> opens a mobile wallet pass. Select an [Adaptive Link](https://www.airship.com/docs/reference/glossary/#adaptive_link) from the list.</p>
<ul>
<li>Adaptive links must be configured before they will appear in the actions list. See: <a href="https://www.airship.com/docs/guides/wallet/user-guide/create-links/dashboard/">
Create adaptive links using the dashboard</a>.</li>
<li>Only adaptive links created in the dashboard will appear in the actions list.</li>
</ul>

### App rating

<p><em>App Rating</em> prompts the user to rate the app in the app store. Optionally enter a custom message title and body.</p>
> **Note:** **App Rating display behavior differs by operating system:**
> 
> * The Title and Body dialog appear for Android only.
> * iOS displays its system dialog for app rating. Additionally,
> [Apple limits app rating dialogs to three times in a 365-day period](https://developer.apple.com/app-store/ratings-and-reviews/).
> 
> App rating prompts will process as configured by your message settings, but the displayed dialog is controlled by Apple, not Airship.

> **Important:** iOS requires that you provide your app's Apple ID, which is used as the iTunes App Store Identifier. (Android and Fire OS generate app store links automatically based on information already in your app, so no configuration is required.)
> 
> You can do this by [adding the ID in your Airship project settings](https://www.airship.com/docs/guides/messaging/project/config/itunes-id/), or by editing your plist dictionary.
> 
> In your plist dictionary, add the following, substituting `1111111111` with the app's actual ID:
> ```text
> <key>itunesID</key>
> <string>1111111111</string>
> ```
> 
> 
> A quick way to find the Apple ID is to copy the numbers at the end of the app's App Store URL. If the URL is `https://apps.apple.com/app/id1195168544`, the Apple ID is `1195168544`.
> 
> Another way is to locate your app in [iTunes Connect](https://itunesconnect.apple.com/) and copy the Apple ID.

### Deep link {#deep-link-app}

<p><em>Deep Link</em> opens a screen in your app or website. Select a deep link from the list.</p>
<ul>
<li>Deep links must be configured before they will appear in the actions list. See: <a href="https://www.airship.com/docs/guides/messaging/project/config/deep-links/">Manage Deep Links</a>.</li>
<li>If you selected a <a href="#deep-link-templates">deep link template</a>, fill in each template segment.</li>
</ul>

#### Deep link templates {#deep-link-templates}

<p>Our Deep Link functionality supports URL templates, which expose a friendly interface to your users in our UI, while constructing the correct URL behind the scenes on the fly. You can specify substitution parameters by enclosing them in brackets. For example, if you want to define a Deep Link for a product page screen in your app (or on your mobile website), you can make the product ID number a substitution parameter. Here are example template URLs:
```text
https://yourcompany.com/products/{Product Id}

yourapp://products/{Product Id}
```
</p>
<p>When you enter this URL in the Airship interface, the form parses it and previews the form your users see in the composer. It automatically identifies &ldquo;Product Id&rdquo; as the parameter name, and provides a field to substitute in the actual identifier. So if you had previously entered a product ID of 1872983490 for the above Product ID, the generated URL would be:
```text
http://yourcompany.com/products/1872983490

yourapp://products/1872983490
```
</p>
<p>The interface treats all values for each field as a string.</p>

### Dismiss message

*Dismiss Message* closes the message.

### Preference center

<p><em>Preference Center</em> opens an <a href="https://www.airship.com/docs/guides/messaging/features/preference-centers/">app preference center</a>. Select a preference center from the list.</p>

### Push opt-in

*Push Opt-in* prompts users to enable push notifications. When a user taps the screen element configured with this action, the system behavior depends on the current permission status.

<ul>
<li><strong>Permission already granted</strong>: No prompt appears. The user continues in the app without interruption because iOS and Android do not allow re-prompting for permissions that are already granted.</li>
<li><strong>Permission not yet decided</strong>: The system permission prompt appears, allowing the user to grant or deny push notification access.</li>
<li><strong>Permission previously denied</strong>: The app&rsquo;s system settings open, where the user can manually enable push notifications.</li>
</ul>

### Share {#share-button}

<p><em>Share</em> prompts the user to share your message with apps, social media accounts, and other services. Enter the text you want to accompany the share, including any promotional information, shortened links, hashtags, etc.</p>

### Web page

<p><em>Web Page</em> opens a web page or any valid device-level URL such as App Store or app protocol links. The web page opens in the device&rsquo;s default browser. Enter a URL.</p>

## Email and link actions

Supported actions for:

* Email buttons, links, and images
* App (landing page, Message Center, In-App Automation) links

| Action  | Email | App (Links only) |
| --- | :---: | :---: |
| Call phone number | &#10003; | &#10003; |
| Confirm subscription | &#10003; |  |
| Deep Link | &#10003; |  |
| Open unsubscribe page | &#10003; |  |
| Open website | &#10003; | &#10003; |
| Send email | &#10003; | &#10003; |
| Unsubscribe from all | &#10003; |  |
| Unsubscribe from current list | &#10003; |  |

### Call phone number

*Call phone number* initiates a call from the device. Enter a phone number.

### Confirm subscription

*Confirm subscription* opts the user into email messaging when using [[Double Opt-In](https://www.airship.com/docs/reference/glossary/#double_opt_in)](https://www.airship.com/docs/developer/api-integrations/email/getting-started/#double-opt-in). See also [Email double opt-in links](https://www.airship.com/docs/guides/messaging/messages/content/email/email-double-opt-in-links/).

1. Enter the URL for your confirmation page or enter one of the following URLs for the default confirmation page. For the default page, use the URL that matches your data center location:
   * US: `https://asemailmgmtus.com/opt-in/success.html`
   * EU: `https://asemailmgmteu.com/opt-in/success.html`
1. (Optional) Enter a [link name](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#link-names) for tracking purposes.
1. Determine if clicks should be tracked. You can use the message-level click tracking setting or disable tracking for this link. See [Disabling click tracking for specific links](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#disabling-click-tracking-for-specific-links) in *Email content*.

### Deep Link {#deep-link-email}

*Deep Link* opens a screen in your app. Your app must already be configured to handle the links. See [Deep Links in email](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#deep-links-in-email) in *Email content* for steps and link formatting requirements.

1. Enter a Deep Link URL.
1. (Optional) Enter a [link name](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#link-names) for tracking purposes.

### Open unsubscribe page

*Open unsubscribe page* opens a link to your [custom unsubscribe page](https://www.airship.com/docs/developer/api-integrations/email/custom-unsubscribe-pages/), where users can opt out of messaging. When using a custom unsubscribe page, you do not need to include an unsubscribe link for opting out of all messaging.

1. Enter the URL for your custom unsubscribe page.
1. (Optional) Enter a [link name](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#link-names) for tracking purposes.

### Open website

*Open website* opens a web page or any valid device-level URL such as App Store or app protocol links. The web page opens in the device’s default browser.

1. Enter a URL.
1. (Optional) Enter a [link name](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#link-names) for tracking purposes.
1. Select whether the link should open in the same (current) tab or a new tab.
1. Determine if clicks should be tracked. You can use the message-level click tracking setting or disable tracking for this link. See [Disabling click tracking for specific links](https://www.airship.com/docs/guides/messaging/messages/content/email/email/#disabling-click-tracking-for-specific-links) in *Email content*.

### Send email

*Send email* creates a draft email in the device's default mail client, with preset data defined here. Enter:

* *Mail To* — Email address the message should be sent to
* *Subject* — Text
* *Body* — Text

### Unsubscribe from all

*Unsubscribe from all* opts the user out of:

* All commercial emails if used in a commercial email
* All commercial and transactional email if used in a transactional email

**This action is not recommended for transactional email.**

Enter the URL for your confirmation page or enter one of the following URLs for the default confirmation page. For the default page, use the URL that matches your data center location:
   * US: `https://asemailmgmtus.com/unsubscribe/success.html`
   * EU: `https://asemailmgmteu.com/unsubscribe/success.html`

See also: [Email unsubscribe links](https://www.airship.com/docs/guides/messaging/messages/content/email/email-unsubscribe-links/).

### Unsubscribe from current list

*Unsubscribe from current list* unsubscribes the user from the [Subscription List(s)](https://www.airship.com/docs/reference/glossary/#subscription_list) specified when defining the message audience.

Enter the URL for your confirmation page or enter one of the following URLs for the default confirmation page. For the default page, use the URL that matches your data center location:
   * US: `https://asemailmgmtus.com/unsubscribe/success.html`
   * EU: `https://asemailmgmteu.com/unsubscribe/success.html`

See also: [Email unsubscribe links](https://www.airship.com/docs/guides/messaging/messages/content/email/email-unsubscribe-links/).

> **Important:** Whenever you include an unsubscribe link for a specific list, you must also include an unsubscribe link for opting out of all messaging.

