Send Both Emoji And Deep Link In Push Notification

Both emojis and deep links are handled through the Custom Data field in the Messages editor, and it is certainly possible to configure your push notification to contain both an emoji and a deep link.

A Custom Data payload containing both an emoji and a deep link might look something like this:


{"aps": {"alert": "High Five \uD83D\uDC4B"}, "deeplink":"deeplink://screen3"}

{"aps": {"alert": "Let's sail away! ⛵"}, "deeplink":"deeplink://screen2"}


{"mp_message": "High Five \uD83D\uDC4B", "mp_cta":"deeplink://screen3"}

{"mp_message": "Let's sail away! ⛵", "mp_cta":"deeplink://screen2"}

In iOS, this custom payload will come within didReceiveRemoteNotification.

On Android, your AndroidManifest needs to have a custom push receiver searching for the 'deeplink' key with a custom intent on where to direct the user.

Convert Emoji to Unicode

An emoji must be converted to the correct unicode string to pass into your Mixpanel push notification JSON payload.

  1. Find the emoji here and click on it to add to the top text area
  2. Click the message above the text area which says "Character Readout"
  3. Locate the 4 or 8 characters under the unicode format "hex utf-16 surrog"
  4. Format the 4 characters as \uXXXX or the 8 characters as \uXXXX\uXXXX (for example, "D83D DC4B" would become "\uD83D\uDC4B")
  5. Utilize this \uXXXX or \uXXXX\uXXXX string as an emoji

Once an emoji character is converted to unicode using the above steps, you can construct the appropriate push JSON payload as outlined above.

Find your answer?
0 out of 2 found this helpful



Article is closed for comments.