I've used both snippets below to push a GA event whenever a conversation is started, but neither seem to work. Can anyone tell me what I'm doing wrong here?
@AORourke@Rortega you can't use arrow functions (and other ECMA6 features) in JS that you use in GTM. @Mike_Eastwood's code was to put on your site to send an event straight to GA. To add it in GTM instead, change Mike's code to remove the arrow function, and also you would have to change the ga() call as that wouldn't work in GTM. Maybe make it a custom HTML tag that pushes a custom event to the dataLayer that you can then use as a trigger for to fire a GTM event that will send event data to GA.
we also ran into some issues regarding the chat widget and tracking our conversions.
Our problem was, that we were using a CookieManager to fulfill German/EU DSGVO... We found a solution where we first checked for the CookieConsent and later added the eventListeners for the widget, when ready. We wrote everything down in a small article:
@AORourke@Rortega you can't use arrow functions (and other ECMA6 features) in JS that you use in GTM. @Mike_Eastwood's code was to put on your site to send an event straight to GA. To add it in GTM instead, change Mike's code to remove the arrow function, and also you would have to change the ga() call as that wouldn't work in GTM. Maybe make it a custom HTML tag that pushes a custom event to the dataLayer that you can then use as a trigger for to fire a GTM event that will send event data to GA.