# Push notification deep link or short link? When a push needs a link at all

> How to deep link from a push notification to the right screen on Android and iPhone, when a short link adds value, and what push taps do to your link analytics.

Source: https://straitlink.in/blog/push-notification-deep-link-vs-short-link/

"Add a deep link to the push" sounds like one job. In practice it's two different questions. How does a notification tap get the person to the right screen? And should the notification carry the same short link you put in SMS, email and WhatsApp? The first has a clear answer that doesn't involve any link service. The second depends on what you want to measure.

This post covers how a **push notification deep link** works on Android and iPhone, when a short link earns its place in a push, and what push taps do and don't do to your link analytics. We sell short links, and the honest answer is that many pushes don't need one.

## A push tap is already inside your app

Think about what a short link does. When someone taps it in a browser, the link server decides where to send them: into the app if it's installed, to the store if it isn't, to a page with an "Open in app" button if they're stuck in WhatsApp's or Instagram's browser. After an install, it reconnects the first launch with the link. All of that exists because a link starts outside your app.

A push notification starts inside it. Your app registered for notifications, so it's installed. The operating system shows the notification and, when it's tapped, hands the payload to your app. There's no browser to escape, no store to visit, no install to bridge. What's left is routing: read something from the payload and open the matching screen.

So the plain answer is: put the screen in the payload, not a URL that has to be resolved.

```json
{
  "notification": { "title": "Your order is out for delivery", "body": "Track it live" },
  "data": { "path": "/order/o_93k" }
}
```

## Routing a notification tap

How the payload reaches your code depends on the platform and the push library.

**Firebase Cloud Messaging.** FCM separates notification messages from data messages. When your app is in the background, the FCM SDK shows a notification message for you, and the data payload is handed to your app only after the person taps the notification. In the foreground, your own code decides what to do. That's why the path goes in `data`: it's what your app reads on the tap.

**Android, natively.** The notification's tap action is a `PendingIntent` for the activity that should open, and you put the path in its extras or its data URI. Don't route through a service or a broadcast receiver. Since Android 12, apps that target Android 12 or higher can't start an activity from a service or broadcast receiver after a notification tap (Google calls these "notification trampolines"); the system blocks the start and logs a warning. Build the `PendingIntent` for the activity directly.

**iPhone.** When someone taps a notification, iOS calls your `UNUserNotificationCenterDelegate`'s `userNotificationCenter(_:didReceive:withCompletionHandler:)`, which Apple describes as asking the delegate "to process the user's response to a delivered notification." The response carries the original notification, so you read the path from its `userInfo` there.

**React Native.** If you use React Native Firebase, `getInitialNotification` covers a tap that launched the app from a quit state, and `onNotificationOpenedApp` covers a tap while the app was in the background. Feed both into the same routing function that handles your links:

```tsx title="push.ts"
import { getMessaging, getInitialNotification, onNotificationOpenedApp } from '@react-native-firebase/messaging';
import { openPath } from './navigation';

const messaging = getMessaging();

export async function routePushTaps() {
  const initial = await getInitialNotification(messaging);
  if (typeof initial?.data?.path === 'string') openPath(initial.data.path);
  return onNotificationOpenedApp(messaging, (msg) => {
    if (typeof msg.data?.path === 'string') openPath(msg.data.path);
  });
}
```

`openPath` is the same function you call from the Strait SDK's `onLink` callback, which gives you `e.path` and `e.params` for every link ([Receive links in React Native](https://straitlink.in/docs/sdks/react-native/receive-links/)). One map from paths to screens, two ways in. Call `routePushTaps` once the navigator is ready, for the same reason the docs subscribe to links in `onReady`: a cold start can deliver the tap before there's anywhere to navigate.

## When a short link does belong in a push

There are real reasons to use a Strait link in a push campaign. They're mostly about the other channels in the same campaign.

**The same message goes out everywhere.** A sale reminder often goes by push, SMS, email and WhatsApp on the same day. Push reaches only people who have the app and allowed notifications. Email and SMS reach people who don't have the app, and for them the link does what a push can't: it opens the app if it's there, and otherwise sends them to the store or your website, and on Android carries the screen through the install with the Google Play install referrer. One short link per campaign, with the same destination path the push uses, keeps every channel landing on the same screen.

**You want the channels side by side.** Strait reads the channel of a tap from the `utm_source` on the tap URL first. So `https://hilltop.strait.link/diwali?utm_source=sms` and `https://hilltop.strait.link/diwali?utm_source=email` are the same link counted as two channels. The [UTM builder](https://straitlink.in/tools/utm-builder/) makes those URLs, and [our analytics post](https://straitlink.in/blog/deep-link-analytics-taps-opens-installs/) explains how taps, opens and installs are joined.

**The push points at web content.** If a notification opens an article or an offer page that also lives on the web, and you share that page elsewhere, a link with title, description and image gives it one address and one preview everywhere.

If none of these apply, a path in the payload is simpler and has one less thing that can fail.

## What a push tap does to your link analytics

Here's where you need to be careful, because a push sits next to your links in the funnel without being part of it.

**A path-only push is not a tap.** The notification opens your app without touching our server, so nothing is recorded as a tap, and the SDK doesn't report it as a link open either. The React Native SDK reads links from the launch URL and from the URL events the operating system sends; it has no public method for passing it a URL from a push payload. That's fine. Your push provider already counts deliveries and opens; keep push numbers there.

**Purchases may be credited to an earlier link.** When you record a purchase with `trackEvent`, the app SDKs attach the tap id of the most recent link open, as long as that open happened in the last 7 days ([Events and revenue](https://straitlink.in/docs/sdks/react-native/events/)). A push open isn't a link open, so it doesn't replace that remembered tap. Picture this: on Monday someone opens the app from a WhatsApp link, on Thursday they tap a push and buy. Analytics credits the purchase to Monday's WhatsApp tap. For many teams that's acceptable, since the link did bring them back that week. If you want push revenue on its own row, record it with your push tool's conversion tracking.

**Short link in a push: untested.** You could put a short link URL in the push payload and have your app open it so the operating system hands it back as a link. We haven't tested that on a real phone, and it adds a network round trip that a plain path doesn't need. If you try it, test the cold start and the background case separately.

## Choosing, quickly

| You want | Use |
|---|---|
| A push that opens one screen | A path in the data payload, routed by your app |
| One campaign across push, SMS, email and WhatsApp | A short link for SMS, email and WhatsApp, and the same path in the push |
| Taps per channel for a campaign | A short link with a different `utm_source` per channel |
| Push opens and push revenue | Your push provider's reports |
| People without the app to land on the screen after installing | A short link (push can't reach them anyway) |

## Testing it

- Send a test push with the app closed, in the background and on screen. Each should open the right screen.
- Send the same destination to your phone as a link with [Test my link](https://straitlink.in/tools/test-my-link/), tap it, and check that it routes to the same screen as the push.
- Use `adb` to fire the link without a push; our [adb test commands](https://straitlink.in/blog/test-deep-links-android-adb-commands/) list the ones we use.
- Make a test purchase after a push and after a link tap, and look at which row each lands on in Analytics.

What we haven't tested: we haven't run push notifications through any of these flows on a real phone. The link side (how `onLink` delivers a path, the 7-day purchase rule) is from the SDK code and its tests. Strait's iPhone links were tested on a real iPhone in October 2026, but no push flow here has been run on one yet.

## Sources and how we checked

- Firebase, [Notification and data messages](https://firebase.google.com/docs/cloud-messaging/customize-messages/set-message-type): who displays a notification in the background and when the data payload reaches the app. Read on 5 October 2026.
- Android Developers, [Behavior changes: apps targeting Android 12](https://developer.android.com/about/versions/12/behavior-changes-12): notification trampoline restrictions and using a `PendingIntent`. Read on 5 October 2026.
- Apple Developer, [userNotificationCenter(_:didReceive:withCompletionHandler:)](https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/usernotificationcenter%28_:didreceive:withcompletionhandler:%29): "Asks the delegate to process the user's response to a delivered notification." Read on 5 October 2026.
- React Native Firebase, [Notifications](https://rnfirebase.io/messaging/notifications): `getInitialNotification` for a quit state and `onNotificationOpenedApp` for the background. Read on 5 October 2026.
- The channel order (tap URL `utm_source` first) is from Strait's link engine code. How the SDK receives links, and the 7-day rule for the remembered tap, are from the React Native SDK code and the [Events and revenue](https://straitlink.in/docs/sdks/react-native/events/) docs.
