How To Track Phone Number Clicks On Your Website

OnClick Script Below Updated To Work With Global Site Tag (gtag.js)

I’m always encouraging clients to get onto phone call tracking so that we can see exactly where there calls are coming from.

The problem is that proper call tracking incurs a monthly cost.

And if you’re not running AdWords, you won’t be able to take advantage of Google AdWords’ dynamic call tracking service.

So for those looking for a budget alternative, you can always make do by tracking how many times the phone number link gets clicked/touched on a website.

Limited Trackability

This should fall under common sense… but I’ll say it anyway.

You’ll only get proper insights into phone calls from mobile users.

The reason being is that only someone using a mobile has the ability to click on a phone number and make a call instantly.

When people are using desktops, they’re not clicking their mouse on the phone number to make a phone call.

If you are using Google’s Call Tracking service with AdWords – I recommend not importing this goal into your AdWords panel, as it will cause some doubling up of data.

Plus, sometimes a click doesn’t always result in a call. Proper call tracking is always more reliable and tracking clicks.

The Tracking Code

Go into your website and insert this script where your telephone number is.

Replace INSERT_NUMBER with your/your clients telephone number.

Typically, you would find this in your header file. Although some CMS’, such as WordPress, will allow you to edit it more easily in the dashboard.

<a href=”tel:INSERT_NUMBERonclick=”gtag(‘event’, ‘clicks’, { event_category: ‘Phone Number’, event_action: ‘Clicked’});” class=”cont_no”>INSERT_NUMBER</a>

Update your file/theme options.

Now go check the website and make sure the number looks okay and that no code or strange characters are being displayed where the number should be.

Here’s an example of the exact same code being utilised for the Able Removals website.

This one was quite straight forward, replacing their existing tel: link in their header.php file with our code above.

Onlick Script in Able Removals Header

Old Universal Analytics Code

In case you’re still rocking the older implementations of Google Analytics, I thought I’d leave the old variation of the code on here, rather than removing is as I updated this article.

The code is as follows:

<a href=”tel:INSERT_NUMBER” onclick=”ga(‘send’, ‘event’, ‘Phone Number’, ‘Clicked’);” class=”cont_no”>INSERT_NUMBER</a>

Below is the header.php file in the Mad Cow Entertainment WordPress website which is found through the left hand menu under Appearance>Editor.

Once you’re in the header.php file, you can search for “tel:” which will usually take you straight to the relevant piece of code.

Search on Windows with Ctrl+F and on Mac it’s Command+F.

Mad Cow tel code

There are other times where editing the phone number code is a bit difficult because it’s pulling data from another part of the CMS.

For scenarios like below with CRFWA, you have to play around with the code a bit until you can make it work.

CRFWA Phone Link Tracking

The phone no href section in their Theme Options is there to wrap whatever we INPUT into this field with “tel:INPUT”

The INSERT_NUMBER section of our code is also taken care of by the phoneno field.

That is why there is no <a href=”tel: at the beginning of that code and no “>INSERT_NUMBER</a> at the end of it.

Basically, we took the tracking code example and just removed what was already there like so:

<a href=tel:”0892494889″ onclick=”ga(‘send’, ‘event’, ‘Phone Number’, ‘Clicked’);” class=”cont_no“>INSERT_NUMBER</a>

Create The Phone Link Goal In Google Analytics

So we’ve taught the website how to tell us there has been a click on the phone number.

Now we need to teach Google Analytics how to hear it.

So to do that, let’s head over to Admin>Goals.

Create a goal and name it Phone Link Clicked or something similar.

Then, select our goal type as an Event.

Now, this is where we have to be EXACT, you can’t vary these inputs at all because they have to match up with our tracking code EXACTLY.

In Category, insert: Phone Number

In Action, insert: Clicked

You can leave Label and Value blank

Phone Link Analytics Setup

Testing The Phone Link Goal

We should be good to go.

But as always when you’re setting up goals, you need to test them to make sure everything is working okay.

So now we’re going to go over to our reporting section of Google Analytics and click on Real Time>Conversions.

Real Time Conversions Link

Now, in another tab, let’s go onto our website and click on the phone number.

Switch back to your Real Time>Conversions tab in your browser and check that the conversion has come through. There can be a good few seconds delay so be patient. You don’t have to click refresh.

Phone Link Conversion Real Time

If you’re seeing the same thing I’m seeing, then congratulations! You’ve successfully set up phone link tracking in Google Analytics.

Did this work for you? Has this improved the trackability of your or your client’s website? Got more questions? Get involved in the comments below!