Setting up phone call tracking with Google Analytics and jQuery

Setting up phone call tracking using Google Analytics can be confusing and devastating because it doesn’t go to a certain page, so we cannot use pageviews to easily track the conversion. The only available option is to use Google Analytics event tracking.

In this post I will show you an easy way to track any phone number using Google Analytics and jQuery.

The requirement for this script to run successfully is to have the phone call wrapped in <a> tag with tel: href.

Let’s say your phone tag looks like below:

Now you can put the following script after you load Google Analytics and jQuery.

What does the above script do?

The above script listens to any <a> tag that is clicked. If there is any tel: on the href on the <a> tag, it will fire Google Analytics event tracking under

  • Category: Call
  • Event: Click
  • Label: phone number

If you have already decided with a certain tracking, you can change the code ga('send', 'event', 'Call', 'Click', phone); accordingly.

Setting up Google Analytics Goals

Coming soon

Leave a reply:

Your email address will not be published.