digitalwithyou / craft-facebook-conversion

Craft CMS plugin to send web events directly to Facebook
https://digitalwithyou.com/en/plugins/facebook-conversion/getting-started
Other
0 stars 3 forks source link

Search event doesn't compatible with live search #26

Closed mostafasoufi closed 1 year ago

mostafasoufi commented 1 year ago

Considering that typing on the search box triggers a search event, it makes sense that it wouldn't be compatible, but I'm curious to know your thoughts on this.

https://capture.dropbox.com/YiDHcFYI34opV4am

Diewy commented 1 year ago

Hmm, in this case it might be better to have the clicked result (product name) to be send as an event. So 1x "Grant JB Nova Water Bath, 12L" instead of 4 events typing "simple pro". Or to send the final search term when clicking a result. So 1x "simple prod".

For both you would have to capture the click event on the result and send the event before navigating to the new url. (Btw, use sendBeacon or the keepalive property on the fetch method, more info)

But if there is a marketeer working on the project, ask him/her which events would be the most useful.