Learn business growth with Google Analytics 4 Forums Google Analytics 4 How to track phone click links in GA4

  • How to track phone click links in GA4

    Posted by Alexander on 14 April 2023 at 3:17 am

    “How can I track phone click links on GA4 without using Google Tag Manager? I’m having trouble finding info on this. I know it’s doable because 3rd party and GTM can track them. Can anyone give me some tips?”

    Michael replied 1 year, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Benjamin

    Member
    26 April 2023 at 3:17 pm

    Sure, let me try to break it down for you.

    Some third party services track events on GA4 with the help of a library called gtag.js. If you don’t want to use Google Tag Manager, you can also use this library to track phone click links.

    First, you need to load the gtag.js library onto your page. Next, you’ll have to define a function called gtag(), according to the instructions laid out by Google. Once you’ve done this, you can use the function to send events to Google Analytics. To do this, you call the function like this:

    gtag('event', '<event_type>', {<event_parameters>});

    In the placeholder for <event_type>, you put the type of the event you want to track. And in the placeholder for <event_parameters>, you put any additional details about the event—like what specific link was clicked or how long the phone call was.

    That’s how you would track events if you’re using the gtag.js library. But there’s actually a way for you to bypass involving any library at all. You do this by manually creating the network requests for the events and then directly sending them to the collect endpoint of Google Analytics. It’s a bit more effort, but it’s a viable method.

  • Michael

    Member
    1 May 2023 at 7:19 am

    While Google Tag Manager is a popular option, you can still track click links in GA4 by directly integrating custom event tracking into your website’s code. You can add an event listener for click actions tied to a phone number link and log these as custom events in GA4. Just make sure the linked phone number click is distinct and trackable as an event in your GA4 setup.

Log in to reply.