Answered

Custom Launcher with notification badge using GTM

  • 6 November 2023
  • 1 reply
  • 107 views

Hello guys, I have been trying to create a custom launcher in navbar using GTM and so far I have been able to get the results. The real problem is I am not figuring out how to display the notification count on the launcher. I am new to the Intercom and GTM is so I feel like I am missing something very obvious or not educated enough on this topic. In short, I just wanna know how I can get the notification count.

icon

Best answer by Eden 9 November 2023, 23:43

View original

1 reply

Userlevel 3
Badge

Hey @Bee14 👋 Eden from the support engineer team here.

 

I see that you connected with the support team on this one! Including the solution shared below:

 

The onUnreadCountChange expects a call back function that takes in unreadCount 👇

Intercom('onUnreadCountChange', function(unreadCount) { // Do stuff... });

 

You can then print the unreadCount value which is the count of unread messages (that you can display in a badge or whatever your use case is). This would be the same when using GTM (as it's just a glorified wrapper for our JS API). 👍

 

Reply