Skip to main content
Answered

Custom Launcher with notification badge using GTM

  • November 6, 2023
  • 1 reply
  • 273 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.

Best answer by Eden

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). 👍

 

View original
Did this topic help you find an answer to your question?

1 reply

Eden
Employee
Forum|alt.badge.img
  • Premier Customer Support Engineer
  • 121 replies
  • Answer
  • November 9, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings