Instapage allows running javascript code just after anchor or button click. All you have to do is add this code in the Settings - JavaScript header area of your page.
<script type="text/javascript">
window.instapageAnchorClick = function( element ){
// here is where you add your own code
// element variable holds clicked element
};
</script>