A button with a click push

 

 

<button id="DLClickExampleBttn" onclick="trackButtonClick()">Click me</button>
 

<script>
function trackButtonClick() {
 window.dataLayer = window.dataLayer || [];
 window.dataLayer.push({
   'event': 'buttonClick',
   'buttonText': 'Click me',
   'buttonId': 'DLClickExampleBttn'
   // Add any other relevant data here
 });
}
</script>