Update: Found the solution for this with some googling and fiddling with code from other posts. Posting it here in case someone else needs it:
<div class="sqs-block button-block sqs-block-button">
<div align="center">
<a onclick="myFunction()"
class="sqs-block-button-element--large sqs-block-button-element" target="_blank">Button Text ></a>
</div>
</div>
<script>
... your script to be triggered on click...
</script>