Yes, you can create a 'pre-permission' or 'soft-prompt' In-App Message to explain the value of push notifications before showing the official iOS system prompt. The key is to trigger the native permission prompt from a button within your In-App Message, rather than calling the registration method when the app first launches.
This can be achieved using an Instant In-App campaign.
Step-by-Step Guide
Create an In-App Template: In your Pushwoosh control panel, navigate to Content -> In-apps. Create a new template or use a pre-made one like "Be in touch" as a starting point.
Modify the Button Action: Edit the HTML of your In-App template. Locate the button that you want to trigger the prompt (e.g., an "Allow Notifications" or "Settings" button). You need to change its
onClickevent to call theregisterForPushNotificationsmethod. Replace any existingonClickaction, such aswindow.pushwoosh.openAppSettings(), with the following:window.pushwoosh.registerForPushNotifications()For example, your button's HTML might look like this:
<button onclick="window.pushwoosh.registerForPushNotifications()">Enable Notifications</button>Save the Template.
Create an Instant In-App Campaign: Go to Campaigns -> Instant in-apps and create a new campaign.
Configure the Campaign:
- Select the template you just created.
- Choose your target audience.
- Select an event to trigger the In-App Message. For example, you can use the default
PW_ApplicationOpenevent or a custom event that fires after a user completes a specific action in your app.
Save and launch the campaign. Now, when a user triggers the specified event, they will see your custom In-App Message first. Tapping the button you configured will then display the native iOS push permission prompt.
Using this with Customer Journeys
While you can use an In-App with this logic in a Customer Journey, the behavior for users who have not yet opted-in is different from an Instant In-App:
- Instant In-Apps are triggered immediately by an event within the app.
- Customer Journeys first attempt to deliver the In-App via a silent push notification. If a user has not yet granted push permissions, this silent push will fail. The In-App will then be shown as a fallback on the next time the user opens the app, meaning it will not appear instantly for new users.
Comments
0 comments
Please sign in to leave a comment.