Most Used Workflows
# 🤝help
b
Hey, i want to get more analytics out of the bot. Is there a way to see which workflow was used the most?
g
You could call an external API that stores a record for each card, and compile that data in your end. Thats what we are doing.
Everytime a workflow you add a record to your database.
b
and you aer using botpress cloud right?
f
what external API do you use?
g
Yes
a
I recommend using GA4 or Mixpanel or any analytics platform that has an API. Just add the tracking code via api in an Execute Code card. This will avoid having issues with renaming nodes / workflows
b
I am not sure i understand what you mean? like a GA4 at the beginning of each card?
@acceptable-gold-88171 Any help on this would be highly appreciated
a
create a "before outgoing message hook, and send both event.payload.text and outgoingEvent.payload.text to mixpanel if you want ot send text, otherwise, if you poke in the event object you should see event.state.context which has info on the nodes. If you do it like this, you won't miss anything out, but it can be a bit hard to read, as these node ids are hidden. If you scatter "execute code" cards that do this, you can send more obvious events to an analytics platform

https://cdn.discordapp.com/attachments/1127254174598430811/1131613583881543710/image.png

https://cdn.discordapp.com/attachments/1127254174598430811/1131613584347107440/image.png

6 Views