How to track phone number clicks/touches in Google Analytics

Smartphones are gaining ground on the humble desktop as more and more of us are using portable devices to access the internet. Users looking for services on their mobile device are far more likely to ‘click and call’ rather than send an email.

In order to demonstrate a ROI to your clients, it’s actually really simple to record just how many clicks and calls your clients are receiving within Google Analytics.

Track each click with an event

Whether your phone number is real-text, a graphic or something completely different, you can wrap it with the following code that not only ensures the phone number can be pressed to make a call, but also track just how many people are clicking/touching it:

Ensure that you include the tel: and phone number within the href of the anchor. Within the function, you can see I’ve specified three parameters. You can fully understand how best to label and use these parameters here, but in summary they are ‘category name’ (Phone Call Tracking), ‘action’ (Click/Touch) and the third is an optional label/description for the event (footer). You’ll see in my Gist example above, I have used the optional label parameter to distinguish the location of the phone number.

How it looks in Google Analytics

Screen Shot 2013-04-06 at 17.05.23

The great thing is you don’t need to set anything up at all, within Google Analytics. The event is pushed automatically, and you can find your data by navigating to Content > Events. Not exactly a plethora of clicks in my example above, however you get the idea!

  • jdoree

    Nice write up James. One question though:

    How do you actually use the phone number (that you have as the last variable) in GA? That integer in the _trackEvent call just gets multiplied by the number of events tracked which, in my experience, results in the display of a meaningless number in GA. Do you use it in a way that makes it display more meaningfully?

    • jdoree no to be fair, you’re exactly right and you don’t need to even specify this parameter. I think I used the example above on a page that had two different phone numbers, so I wanted to use the same category and action, but distinguish the numbers by physically specifying them with the optional label. If you check out our contact page sidebar phone numbers, we’ve used this third parameter to distinguish between the two different phone numbers, but actually labelled them with a description rather than the actual number which is better.

      How do you see the multiplication of the value within Google Analytics?

      • jdoree

        For a multiplication example, if I go to Events > Overview and then click on ‘Click-to-Call’ (as per your example), I’m taken to a Top Events page that shows that category. There’s an Event Value column that is equal to Total Events x the phone number that was used as the fourth parameter.

        • Ahh OK, I see so are you using all 4 parameters? I’ve just updated my code snippet above with a Gist, but I don’t think I was using the 4th ‘value’ one. Just looking in my GA now, and the Value column for me is just blank. What do you have in the other 3 parameters, Click-to-Call, ?, ?, phone number?

          • jdoree

            I seem to be doing the exact same thing you are but I’m using an integer (the phone number) where you now have ‘footer’. Here’s what I’m using:


            If I put were to put ‘footer’ where I have 0123456789 I would get an error that this has to be an integer.

          • Try adding the inverted commas around the number. Where are you seeing the error? In the Browser console?

          • jdoree

            I’ve used single quotes, which is what you have in your example.

            The error would appear in the Javascript console and the event wouldn’t get tracked.

          • Should be fine with: _gaq.push([‘_trackEvent’,’Click-to-Call’,’Header’,’01788513403′]); the inverted commas like that. Please could you double check for me, and let me know if you get the error.

  • S franzen

    hi james, great article, however i have put this code ( here without otherwise it will post this as code) onclick=””_gaq.push([‘_trackEvent’,”>+31 6 317511888 in my code for the telephone number and did the settings in GA accordingly. Still nothing happens in the reports. I know for sure mobile users clicked on the telefone number several times last months. what am i doing wrong?

  • Josh Polsky

    how would i put this code into the header? i am using a theme that doesn’t allow me to tag the html. Thanks!

  • Daniel Groover

    I’ve put this code on my site but NOTHING has been showing in my analytics about clicks on anything.

  • Is there a way to track every click on a … href=”tel: … as an event? Hrm… I’ll look into that and if I find something let you all know.

    • $(“a[href^=’tel:’]”).click(function(event){
      ga(‘send’, ‘event’, ‘Contact’, ‘Phone’, ‘Click’);

      • Marcus Crutcher

        thanks for adding this, Peter. very useful. easy to modify for email click tracking as well.

        for WordPress users, just add opening & closing script tags & replace $ with jQuery