How to track phone calls from a website 

how to track phone calls from website - phone call to action icon

If your main income is generated by website calls you may want to know how to track phone calls from a website. This can be done by tracking clicks on the  call button for each web page.  This however does not guarantee that they made the call - the user has only clicked on the call button.  The instructions here assume that the Google Analytics setup tracking code has already been setup on the website. 


Step 1 - Change your web page source code.

Locate the <a href="tel:078783238233 "> tag on your web page.

Add the onclick gtag event to the <a> tag after your telephone number.

<a href="tel:078783238233" onclick="gtag('event', 'click', {'event_category': 'Click to Call','event_action': 'Home page call'});"

This will send Google Analytics the event that a potential customer has clicked on the call button.  I found these articles relevant and really useful.  

Measure Google Analytics Events

Anatomy of Google Event parameters

Step 2 - Setup Google Analytics event

In Google Analytics, go to Admin -> View -> Test View -> Goals.

Add New Goal =Custom. Name="Website call". Type = event

Setup Goal details as shown below.  I set the action on each web page e.g. Home page call so I can track which page the calls are coming from.

How to track phone calls from a website - Google Analytics setup

Step 3 - Test it works

Clear Browser Cache (History, Website Data & Cookies) in your phone Browser settings.

On laptop view look at  Google Analytics->Real time->Events. Scroll down until you can see events.  On your mobile make a call from the website page.  You should see it in Google Analytics 

Website phone calls tracked using Google Analytics


Phone call event code tracking not working?

Check the following:

1. Universal Analytics is now the operating standard for GA.  If you are not using  it then the above steps won't work for you.  Use the link here to measure events with analytics.js.

2. In Google Analytics check that...

 -  Your mobile phone IP address has not been excluded.  If it is, use another phone.

-   That the tracking info in Admin->Property->Tracking Info is the same as you have in WordPress.

-   That you are viewing the Real time call event in the view that you set the event up in e.g. test view.

3.  Before testing:

-  Make a minor change to your web page, so that you know it has been updated when you test the call tracking.

-  Clear Browser Cache each time you test. 

4. Other checks:

-  Line up the web page code and the Google Analytics event tracking  to make sure the category is exactly the same.

- If you are using a plugin to add the GA tracking code to your website, some rename the ga object to something like gaTracker.  Check your source code.  If this is the case, rename it in the onclick.

Conclusion: How to track phone calls from a website 

I wrote this guide so that I could refer to it each time I have to setup phone call tracking.  I hope you find it as useful as me. Feel free to share or comment.