Topics in this section

How to Setup Key Value Pair Based CTR Redirection

Prerequisite

  • Set up a Firebase Cloud Messaging client app in your Android APP
    https://firebase.google.com/docs/cloud-messaging/ios/client
  • The FirstHive APP push API is implemented in your app as per the steps shared in the SDK integration document.
  • The App needs to support key-value in their app

Once the above is in place, In FirstHive App push campaign setup, you can define the CTA of the campaign with Key and Value. 

  • The key represents the key name defined in your app for the app screen and the value represents the screen itself.
  • When you define the key and value in FH, it will send the value in the notification tray data payload as shown below.
  • The App needs to read it from the notification tray and open the relevant screen.
    Example below,

    {
    
    "to" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    
    "collapse_key" : "YYYYYYYYYYYYYYYYYYYYYYYYYY",
    
    "notification" : {
    
     "body" : "Test notification content",
    
     "title": "Title of the message",
    
     "image": "<Image URL>"
    
    },
    
    "data" : {
    
    "url":"<URL>",
    
    "customPayload": {
    
     "screen":"HomePage",
    
     "messageId":"123456"
    
    }
    
    }
    
    }
  • The message id is the id that the App needs to pass in below API to register the App push click in FirstHive.

Whenever the app receives a value in the data payload for the key messageId, it should trigger the following API and pass the tracking ID back to FirstHive

URL https://firsthive.com/engage/mobile/trackNotification
Method POST
Parameter <messageId to identify the user for the campaign, received in the custom payload section mentioned above> Mandatory 
authKey XXXXXXXXXXXXXXXXX (Will be shared separately for the account)

Notes - Free interface icons NOTE

Contact your account representative for the authentication key.