Post

Track Phone number clicks in Google Tag Manager

Add a Google Tag

This only needs to be done once in your gtm and you can reuse it for all events The Google tag establishes the data flow from your website to Google Analytics and other destinations

Creating a google tag

Add Click Variables

This only needs to be done once in your gtm and you can reuse it for all click events

Go to Variables

  • Click configure in top right
  • Scroll down to clicks

To ensure we have the required Variables enabled in GTM we need to add the ones we need for the click tel.

  • For tracking phone clicks, we just need to add the Click URL from the “click” section of variables.
  • Scroll down and enable the Click URL by checking the check box.
  • Then click Add

enable click url variable

Add Triggers

  • Call it phone
  • Click - just links.
  • Some link clicks.
  • CLICK URL contains tel:
  • Save

tag manager trigger configuration for tel clicks

Create a Phone click Tag

  • Go to Tags
  • Click new tag
  • Tag configuration
  • Choose Google Analytics
  • Choose Google Analytics: GA4 Event
  • Add GA4 Measurement ID

Your tag should be able to locate the google tag you created earlier. If your tag cannot find the google tag. then your missing your google tag and you still need to add it. Creating a google tag

img-description

Get Measurement ID

Now you need to go to Google Analytics instead of tag manager. Frustrating? Absolutely! So open a new tab and start loading up the Google Analytics account for the client your working for.

  • In Admin, under Data collection and modification, click Data streams.
  • Select the Web tab.
  • Click the web data stream.
  • Find the Measurement ID in the first row of the stream details.

Now you need to back to tag manager and add in the measurement id.

Add Event Name

  • phone_click

Add Trigger To Tag

  • Choose your phone trigger you created earlier
  • Hit save

Preview

  • hit preview
  • add url

View the data sent from GTM in GA4

  • Login to Google Analytics
  • Click Engagement
  • Click Events
  • if users have interacted with your site by clicking the click tel then you will see that event in GA4

more resources

more info

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.