Show an in-app before the push permission prompt
A pre-permission in-app is a message you show before the system push permission prompt. Use it to explain why push notifications are useful, then ask for permission only after the user says yes in your in-app.
On iOS, the system prompt appears only once per install. If the user taps Don’t Allow, the app can’t show that prompt again. Push stays off until they turn notifications on in Settings. Asking in-app first means you spend that one shot only on users who’ve already said yes to you.
Use this guide if you want to design one cross-platform HTML prompt in the Control Panel and trigger it by event on both iOS and Android.
Use a different guide if:
- Your team will ship an iOS-only prompt in app code (not editable in the Control Panel, not started by a Journey event): iOS push primer.
- You need to re-engage users who already disabled push or never granted it (recovery only, not the first ask): Create opt-out recovery popups.
Before you start
Anchor link toPushwoosh never shows the system permission dialog by itself. There is nothing to configure in the Control Panel to delay it. The dialog appears only when the user taps the accept button in your in-app.
Work with your development team on these prerequisites:
- Confirm the app does not request push permission earlier (including on first launch).
- Agree on a custom event name and when to fire it, for example
onboarding_completedright after onboarding, orlocked_feature_tappedwhen the user taps a feature that needs notifications. Your team will callpostEventwith that name. Learn more about events.
Build the in-app
Anchor link toThe buttons in this guide run on custom JavaScript, which only works in an HTML-based in-app template. A native in-app template can’t run this code, so don’t build the template with Native in-app.
- Go to Content → In-Apps and click Create in-app to open the built-in editor directly.
- Enter a template name.
- Open the Blocks tab in the right panel and add a text or heading block with your pitch for enabling push.

- Add a button block for the accept action and another for the decline action. Both buttons can run their JavaScript as soon as the in-app loads, with nothing else to wait for.

- Select the accept button and set Action type to Custom Javascript.
- Paste only the code below into onClick.
pushwoosh.registerForPushNotifications();pushwoosh.closeInApp();- Select the decline button and set Action type to Custom Javascript.
- Paste only this into onClick:
pushwoosh.closeInApp();After you save the template:
- Accept button: the system permission dialog appears.
- Decline button: the in-app closes and no system dialog appears.

Skip the prompt for users who already opted in
Anchor link toAdd a display condition so the in-app hides itself for users who already granted push, even if a later trigger shows the template again. Push consent status comes from Push Alerts Enabled, a default Boolean tag the SDK sets from the device’s system notification permission.
- In the Layers panel, click the first block, then Shift-click every other block to select the whole template together.
- Turn on Show this block conditionally. The rule you set below applies to the whole selection at once.
- Set the rule to Push Alerts Enabled is false.
- Under If value is unknown, choose Show block. A fresh install with no tag value yet should still see the prompt.

Trigger the in-app before permission is requested
Anchor link toA device that hasn’t gone through registration yet has no push token, so you can’t reach it with a push notification. Trigger the in-app by the custom event you agreed on with development.
- Ask your development team to call
postEventwith the agreed event name at the moment you want to ask. - Go to Customer Journey Builder → Create Campaign and start with a Trigger-based entry that listens for that event.
- Add an In-app element and select the template you built. Learn more about sending in-apps via Customer Journey.
- Launch the journey when you’re ready to show the prompt.
Example scenario: ask for push permission right after onboarding
Anchor link toImagine you want to ask for push permission the moment a user finishes onboarding, instead of interrupting the tutorial itself.
- Create the event
onboarding_completedand confirm your development team fires it when the user finishes the onboarding flow. Learn more about creating events - Set
onboarding_completedas the trigger for your journey, using a Trigger-based entry. - Add an In-app element and select the pre-permission template you built.
- Launch the journey.
Every user who completes onboarding sees the prompt once. The display condition from Skip the prompt for users who already opted in keeps it from firing again for users who already granted push.
Check it worked
Anchor link toThe system prompt is one-shot, so testing both buttons takes two test devices (or two fresh installs) that haven’t granted or denied push yet, one for each button. On each device:
- Fire the agreed event from the app.
- Reopen the app and confirm the journey delivers your in-app.
Then:
- On the first device, tap the accept button and confirm the system permission dialog appears.
- On the second device, tap the decline button and confirm the in-app closes with no system dialog.
- After the next app open, confirm Push Alerts Enabled matches the permission state on each device.
Build a segment of users who still have push disabled
Anchor link toFilter on Push Alerts Enabled to find users who declined or never granted the permission. The tag is false when push isn’t allowed yet, including before the user has seen the system dialog, so a pre-permission device already falls into this segment.
- In the segment builder, add a filter by the Push Alerts Enabled tag.
- Set the operator to is false. Learn more about building segments by tags.
Use this segment to hold back a repeat prompt from users who still don’t have push enabled, or to run a periodic win-back journey. See the opt-out recovery segment for a worked example with the same tag.
See also
Anchor link to- iOS push primer: the native, iOS-only alternative to this cross-platform HTML approach.
- Create opt-out recovery popups: recover users who already disabled push (not the first ask), using the same Push Alerts Enabled tag.
- Create in-apps with JavaScript: the full JavaScript bridge reference.