Google On-click event on my search button

Can someone help me with my code. I tried following the directions of another post on here but it doesn’t seem to be working. Then google gives me this code below to use but I don’t know where to put it to associated it with my buttons. Any help please!

onclick="gtag(‘event’, ‘clicks’, { event_category: ‘home-search-button’, event_action: ‘click-button’, event_label: ‘homepage-click’}); - THIS IS FOR HOMEPAGE SEARCH BUTTON

onclick="gtag(‘event’, ‘clicks’, { event_category: ‘nav-link’, event_action: ‘click-link’, event_label: ‘nav-click’}); - THIS IS FOR NAVIGATION SEARCH LINK


Here is my public share link: https://preview.webflow.com/preview/listing-leaders?utm_medium=preview_link&utm_source=dashboard&utm_content=listing-leaders&preview=dbbe90d72dae27c3567bfde7cd0e6225&mode=preview