Feb 4, 2019 2:34 PM - edited Feb 4, 2019 2:35 PM
How can i trigger an event in google analytics when someone completes a chat in the chatbot successfully?
Feb 4, 2019 4:53 PM
HI @jerome2792
You can trigger a Workflow from a Bot (Professional or Enterprise only) in your Workflow you could trigger some Custom Code to Push the Google event.
With Enterprise packages you can execute code (Push to Google API).
Details: https://knowledge.hubspot.com/articles/kcs_article/conversations/a-guide-to-bot-actions
Unfortunately it doesn't look like Zapier has access tot he Bots yet...
Mike
Mar 12, 2020 1:37 PM
How would you go about firing custom code in a regular workflow? I don't seem to be able to do so, even though I can trigger a workflow within a chatflow.
Mar 12, 2020 3:34 PM
Hi @znicholson
It depends on what version of HubSpot you have:
To call external code we use a hidden property (set by a workflow or other event). We then set up a HubSpot App to watch for the change event on the hidden property. When the property changes we execute the code.
If that's a bit vague – not sure of your exact usecase – feel free to get in touch.
Mike