Hi there WIXcode heros.
After talking to the support help-desk, I was unable to track clicks that takes place ‘inside’ Menus \ Search Bar \ Calendars.
As for a buttons - I open the “Properties”, add a On-Click lable, and then I used this code:
import wixWindow from ‘wix-window’;
export function downloadButton_click(event, $w) { wixWindow.trackEvent(“CustomEvent”, { “event”: “Document Download”, “eventCategory”: “Downloads”, “eventAction”: “Download”, “eventLabel”: $w(‘#dataset1’).getCurrentItem().title } ); }
And it works just fine! - My Google Analytics reads the Event!
But when entering a Menu ‘Properties’ ,for example, there is no ‘On-Click’, and further than that… there is no real separation between the different buttons there, to configure individually, each one as a different ‘Event’. I could replace the menu for buttons to by-pass this, but…
On a Wix-Hotel “Search Bar”, or - Calendar, its not really possible, since its connected to the data base (CRM), and therefor impossible to replace by buttons… (or is it?)
Thanks so much for your help!