Search code examples
push-notificationdeep-linkingfacebook-analytics

How do I setup deep link for the Push Notification in Facebook Analytics?


In the Facebook Analytics document, it said the Push Notification could deep link to a certain page in the app, but I cannot find how to setup the deep link in the "Push Notification" campaign.

Does anyone how to set it up? Thanks


Solution

  • Facebook Analytics supports two types of push campaign - standard push notifications and in-app notifications.

    For standard push notifications, if you want to deep link you'll need to manually configure the push payload by enabling 'Attach JSON Data' (see here for iOS docs on payload). This existing stackoverflow answer explains how to deep-link in push - Deep Linking iOS Push Notifications. Basically you include some meta data that you handle in your app yourself and take the appropriate actions. See screenshot below with productIdToOpen parameter.

    Custom JSON Data

    For in-app notifications it's even easier. Assuming you've already setup a scheme for your app to handle deep-links from the web, you can just configure one of the buttons to use that scheme. See the screenshot below.

    Using custom schemes in in-app notifications