How to add Click Actions

How to Create Click Actions for an In-App Message for example using a URL, tagging users and sending outcomes

Click Actions can be added to all blocks enabling your users to click onto the element.


Image. Shows the flow of using Click Actions to form Location and Push prompts for iOS

Click actions can include the following abilities:




Leaves the app and opens the default browser to the URL you specify.

Push Permission Prompt

Shows the native iOS or Android Push Permission Prompt.

  • If iOS or Android device is currently subscribed, prevents the In-App Message from showing.
  • If iOS or Android device is currently unsubscribed and has been prompted previously, it will show a native alert asking the user to enable push notifications in the app settings.

Location Permission Prompt

Shows the native operating system prompt to ask permission for location tracking. See Location Opt-In Prompt for details on setup.

Sent Outcome

Help you understand how successful your In-App Messages by tracking the action. Outcomes sent through In-App messages will show as "Unattributed" in Delivery > Outcomes and will set a tag on the device in format outcome name : true.

Read more about Outcomes.

Tag User

Can add data tags to a user to express interest and later segment into another group based on user response to send more targeted messaging.

Custom Action ID

Pass a custom value into the OneSignal SDK inAppMessageClickHandler method.

Used for custom action handling like:

How to collect custom click actions

When an Image or Button block is clicked, you can use the Custom Action ID and set a value to identify that block was clicked. This Action ID can then be detected through the OneSignal SDK inAppMessageClickHandler method and that data can be sent to your server/date base/analytics vendor.

Example: Create a Poll

If you want to survey your users with a multiple choice questionnaire and then display their choices within the app. You can setup the Action ID per button to be a unique identifier for that option. Whenever that option is clicked, it will be detected in the inAppMessageClickHandler. From there, you can make an API request to your server to store that data and access it within the app later to display to your users.

How to deep link within the app

If you want to deep link into another page of the app, using the Click Action you can specify an "Action Name". This action name is available within the In-App Message Click Handler method inside the OSInAppMessageAction object called clickName.

When you detect this clickName you can then deep link to the page in your app.

Example: If you normally detect on a push notification the data "deepLink": "page3" using the Notification Opened Handler, then in the In-App Message Click Handler method you would specify page3 for the clickName.

You can have different clickName's for the image, button and background. If you don't sent a clickName, then it will be "null" and you can ignore it.

How to Create a Rating Action

Let's send the user to the app store when they click the Image or Rate Now button. Using the URL Click Action you can add your App's Store URL.

To Deep Link to the App Store, use the following guides:

Android -
iOS -

If you want to set for iOS and Android App stores separately, you can easily duplicate this IAM and target 2 Segments, one for Android and another for iOS using the "Device Type" data filter. Simply update this URL for the Android and iOS Segment targeted in each URL Action.

If the user clicks the button to dismiss, you can add a Data Tag to mark that the user selected "Remind Me Later" and we can re-target them again at a later time with this same message or send them a push!


Image showing In-App Message requesting Ratings

Did this page help you?