Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter biggestleaf

    (@biggestleaf)

    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!

    Thread Starter biggestleaf

    (@biggestleaf)

    Hi Baden,

    I’d like to hide the full telephone number so desktop user have to click on the 12345xxx part to see the the full number which I’ll be able to track in Google Analytics. In addition, I’d like to give the full number a clicktocall function for mobile users (tel:) to improve user experience. So I don’t want it to jump to another page.

    I get both features to work when it expands below. However, I’d like to make use of the swaptitle feature instead so the full number shows where the 1234xxx part is. Any idea how I can accomplish this?

    As expected, the issue was created by a plug-in. For me it was the Tagaroo plug-in just like salmanminur. Thanks for the thread.

Viewing 3 replies - 1 through 3 (of 3 total)