Can integrate it to Google analytics ?
# 🌎general
a
Can integrate it to Google analytics ?
a
hi, you can you do this using a snippet inside a before-message sent hook that sends the event.preview and outgoingEvent.preview to google analytics.
a
Thanks you, is there any tutorial ?
a
In before outgoing it's something like this : const GA4_OUTBOUND_LINK =
https://www.google-analytics.com/mp/collect?measurement_id=${measurement_id}&api_secret=${api_secret}
const client_id = event.target const sendAnalytics = data => { axios.post(GA4_OUTBOUND_LINK, { client_id, events: [{ name: 'botSays', params: event.preview }] }) } In after incoming do the same, but change botSays with userSays
2 Views