Hi Baden and other readers,
I’ve conquered the castle ??
For those also looking for a solution, the following code will do the following:
-visitors will have to click to show the entire phone number
-these clicks can be tracked in Google Analytics
-on mobile devices the full phone number can be touched and it will call the number
Here is the code:
[expand title="+27 23 456 XXXX (click to show)" swaptitle="<a href='tel:+27 23 456 7890'>+27 23 456 7890</a>" trigclass="noarrow" id="button" alt="Click to show number"]On mobile: touch number to call[/expand]<script type="text/javascript">
jQuery("#button").attr("onClick", "_gaq.push(['_trackEvent', 'button', 'clicked', 'label']);return true");
</script>
Enjoy it!