How to customize the popup

Where is define the “popup” apearring when you click on a badge ?

I have a traffic estimated time “badge” displaying in minutes how long to go to my work and when I click on it, a popup appear displaying all informations related to this entities.

I’d like to add a google map with the traffic and the red section on the road :o)

But I’d like to customise more of them :wink: so I need to know how to hack the first one.

Tks