Search code examples
google-analyticsjoomla3.0

How to track event (click on phone number) in Google Analytics for Joomla 3.9?


I tried several methods to track phone call event in Google Analytics, but without success.

In the moment I've used: ga('send', 'event', 'Phone Call Tracking', 'Click to Call', '0884344644', 0);

Here is the and screenshot: https://i.sstatic.net/DWEuy.jpg

This code does not send an event in Google Analytics. Any ideas what I can do?


Solution

  • You are using gtag tracking code (not ga), so to measure Google Analytics events you need to use the appropriate syntax:

    gtag('event', 'Click to Call', {
      'event_category': 'Phone Call Tracking',
      'event_label': '0884344644',
      'value': 0
    });
    

    https://developers.google.com/analytics/devguides/collection/gtagjs/events