Sharath Sriram, Author at Branch https://www.branch.io/resources/author/sharathsriram/ Unifying user experience and attribution across devices and channels Thu, 21 Aug 2025 17:04:28 +0000 en-US hourly 1 How To Set Up Branch Links in Your Push Notifications https://www.branch.io/resources/blog/how-to-set-up-branch-links-in-your-push-notifications/ https://www.branch.io/resources/blog/how-to-set-up-branch-links-in-your-push-notifications/#respond Tue, 10 Dec 2024 14:57:00 +0000 https://branch2022stg.wpenginepowered.com/?p=19840 Learn how to integrate Branch Links into your push notifications and take your mobile marketing to the next level.

The post How To Set Up Branch Links in Your Push Notifications appeared first on Branch.

]]>
Branch Solutions Architects Sharath Sriram and Zain Sattar Both contributed to this article.


In today’s mobile-first world, push notifications are one of the most effective tools brands have to reach and engage their audience. With users increasingly selective about the mobile apps they interact with, push notifications and in-app messages provide a direct line to grab user attention. Perhaps most importantly, push notifications significantly impact reengagement and retention. After 90 days, app users who have opted in are 88% more likely to interact with the app.

One of the best ways to amplify the impact of your push notifications is by adding deep links that lead directly to specific content within your app. This targeted approach helps users skip multiple steps, taking them straight to the content they care about — a product page, special offer, or personalized update. By setting up Branch Links in your push notifications, you can create a seamless user experience that enhances engagement, reduces friction, provides valuable metrics, and ultimately helps build a stronger relationship with your customers. Read on to learn how to integrate Branch Links into your push notifications and take your mobile marketing to the next level.

Step 1: Create a Branch Link

The first step is creating a Branch Link to use in your push notification payload. We recommend creating unique links specifically for your push notifications. This way, you can easily track where the traffic is coming from by matching these links with the correct analytics data.

You can create a Branch Link from:

Step 2: Add the Branch Link to your push notification payload

Once you have created the Branch Link, you will need to add it as part of your notification payload. Some push notification providers allow you to add new values directly in the UI, while some might require editing a JSON file. Ensure that you place the Branch Link at the top level of your payload content with the key as branch. Here’s an example:

{

“aps”: {

“alert”: “Push notification with a Branch deep link”,

“badge”: “1”

},

“branch”: “https://example.app.link/u3fzDwyyjF”

}

Step 3: Add a push notification handling function to your iOS and Android apps

After setting up your push notifications, configure your apps to handle these Branch Links.

iOS

On iOS, Branch provides a convenient function that looks for the branch parameter in the payload and automatically handles the link.

If you are using the application(_:didReceiveRemoteNotification:fetchCompletionHandler:) function in your App Delegate to handle push notifications, add the following line as part of this function:

Branch.getInstance().handlePushNotification(userInfo)

If you are using the userNotificationCenter(_:didReceive:withCompletionHandler:), you can use this line:

Branch.getInstance().handlePushNotification(response.notification.request.content.userInfo)

Android

Similarly, Branch provides a function on Android that looks for Branch parameters and handles the underlying Branch Link within the payload. Specifically within the Main Activity, the onNewIntent() method is called on the existing activity instance to handle the incoming new intent, which allows the activity to update its state or perform any necessary actions based on this new intent data. Only if the intent extra data matches, branch_force_new_session = true, will it then re-initialize the SDK with the corresponding push notification payload.

override fun onNewIntent(intent: Intent?) {

super.onNewIntent(intent)

this.setIntent(intent);

if (intent != null && intent.hasExtra(“branch_force_new_session”) &&

intent.getBooleanExtra(“branch_force_new_session”,false)) {

Branch.sessionBuilder(this).withCallback { referringParams, error ->

if (error != null) {

Log.e(“BranchSDK_Tester”, error.message)

} else if (referringParams != null) {

Log.i(“BranchSDK_Tester”, referringParams.toString())

}

}.reInit()

}

Need help troubleshooting or have more questions? Reach out to our team.

The post How To Set Up Branch Links in Your Push Notifications appeared first on Branch.

]]>
https://www.branch.io/resources/blog/how-to-set-up-branch-links-in-your-push-notifications/feed/ 0
How To Set Up Deferred Deep Linking on iOS https://www.branch.io/resources/blog/how-to-set-up-deferred-deep-linking-on-ios/ https://www.branch.io/resources/blog/how-to-set-up-deferred-deep-linking-on-ios/#respond Tue, 08 Oct 2024 15:32:51 +0000 https://branch2022stg.wpenginepowered.com/?p=19694 Learn how to set up deferred deep linking on iOS with NativeLink, an on-device solution that does not require the use of an IP address.

The post How To Set Up Deferred Deep Linking on iOS appeared first on Branch.

]]>
No matter your business, consumers increasingly demand that their specific needs and wants are met through accelerated service, relevant offers, easier connection among their devices, or more personalized interactions. In fact, according to Salesforce, 73% of consumers expect experiences to be better as technology advances and 79% said that customer experiences should be better considering all the data companies collect.

Clearly, catering to the customer experience is paramount. And there’s a surprisingly easy way to improve customer experience while collecting valuable insights into user behavior. Enter deferred deep links.

What are deferred deep links, anyway?

To understand deferred deep links, you must first understand what deep links are. Deep links direct users directly to a specific page in your mobile app or website rather than a generic homepage. Direct deep links take users to the correct app content when the user already has the app installed, which keeps users from getting lost or frustrated by not receiving the content they anticipate.

Deferred deep links are even more innovative: They keep context and route new users to specific content through an install. The link will first redirect to the Apple App Store or Google Play Store, and once the app is downloaded and opened, the user will be taken to the content they expect.

A series of mobile screens showcasing a Twitter post and Pandora app promoting the "LeBron James: Revenge SZN" playlist.

In this example, LeBron shares a playlist on X (formerly Twitter). When a user clicks the link on their mobile phone, they will be taken to the playlist with a banner that asks the user to listen in the app. If the user has the app, they will be taken directly to the playlist in the app. If they are a first-time user that doesn’t have the app, the deferred deep link “knows” this. It sends the user to the App Store to download the app and then automatically opens the playlist in the app, creating an engaging, seamless user experience.

Deferred deep linking enables better user experiences by connecting users to their desired content, facilitating personalized experiences and interactions, and breaking down app barriers. You can even use a single deep link across all your channels: email, ads, SMS, QR codes, smart banners, in-app notifications, social media, and more. Plus, deep link data allows businesses to better understand user behavior, continuously optimize user journeys and marketing campaigns, boost user engagement, and increase conversion rates.

How to set up deferred deep linking on iOS

Now, let’s examine how to actually set up deferred deep links on iOS using Branch.

If you have set up the Branch iOS SDK correctly, deferred deep linking should work out of the box for many of your iOS users. However, for users who have opted for an iCloud+ subscription, an option called Private Relay is enabled by default. Private Relay masks the IP address of the user and prevents Branch from accurately matching user sessions.

For such cases, Branch has a solution called NativeLink that helps you achieve deferred deep linking. NativeLink is an on-device solution that does not require the use of an IP address. Instead, it gives users the choice to copy the deep link content to their clipboard and later accesses it from within the app to deep link them to the right page.

How to implement NativeLink in your app

Step 1: Enable NativeLink on the Dashboard

On the Branch Dashboard, head to the Configuration section and click on the “Enable NativeLink” checkbox.

You will also notice an audience rule that defines which set of users will use NativeLink.

There are three options:

  1. All iOS Traffic (All Browsers): All users on iOS will use NativeLink when the app is not installed.
  2. All iOS 15+ Traffic (All Browsers): All users who are using iOS 15 or later will use NativeLink when the app is not installed. Users on older versions of iOS will be deferred deep linked using the IP address.
  3. Only iOS Private Relay Traffic (Safari & In-App Safari Browsers): All users who have the Private Relay feature enabled will use NativeLink when the app is not installed. Users who don’t have Private Relay enabled will be deferred deep linked using the IP address.

Step 2: Implement the method to check pasteboard in your app

Your app needs to check the contents of the pasteboard so that NativeLink can be achieved. Add this line of code before the Branch SDK initializes:

Branch.getInstance().checkPasteboardOnInstall()

If the user is on iOS 16 or later, they will see a paste prompt when your app reads the clipboard content.

For developers who want to customize this prompt, Apple provides the UIPasteControl class as an alternative. If you are planning to useUIPasteControl, avoid calling checkPasteboardOnInstall on iOS 16+ devices like this:

if #available(iOS 16.0, *) {

// Don’t check pasteboard on install, instead utilize UIPasteControl

} else if #available(iOS 15.0, *) {

// Call `checkPasteboardOnInstall()` before Branch initialization

branch.checkPasteboardOnInstall()

}

Then, to send the clipboard data to Branch, configure your UIPasteControl’s target and add the following function as part of the paste(itemProviders:) function:

Branch.getInstance().passPaste(itemProviders)

Alternatively, Branch also provides a wrapper class BranchPasteControl to automatically pass clipboard content to the Branch SDK from UIPasteControl.

You can set up a BranchPasteControl button like this:

// Inside the ViewController

if #available(iOS 16.0, *) {

// Setup `UIPasteControl` configuration

let pcConfig = UIPasteControl.Configuration()

pcConfig.baseBackgroundColor = UIColor.blue

pcConfig.displayMode = UIPasteControl.DisplayMode.iconOnly

// Create frame and button

let frameDimension = CGRect(x: 0, y: 0, width: 40, height: 40)

let bc = BranchPasteControl(frame: frameDimension, andConfiguration: pcConfig)

// Add `BranchPasteControl()` button to superview

view.addSubview(bc)

}

All set

Now you can start using deferred deep links on iOS! If you run into any issues or have additional questions, reach out to our team.

The post How To Set Up Deferred Deep Linking on iOS appeared first on Branch.

]]>
https://www.branch.io/resources/blog/how-to-set-up-deferred-deep-linking-on-ios/feed/ 0