Google Tag Manager (GTM) lets you track website interactions without writing code for each one. One useful option is the link-click trigger, which fires tags when people click specified links. It can track linked buttons, outbound links, telephone links (tel:) and more.

Steps to set up a link-click trigger in GTM

Step 1: Enable click variables in GTM

Before creating the trigger, enable the required variables:

  1. Sign in to Google Tag Manager and select your container.
  2. Open the menu "Variables".
  3. Under "Built-in Variables", click "Configure".
  4. Scroll to the category "Clicks" and enable the following variables:
    • Click Element
    • Click Classes
    • Click ID
    • Click Text
    • Click URL

Step 2: Create a link-click trigger

  1. Open the menu "Triggers" and click "New".
  2. Click the trigger configuration box and select "Click – Just Links".
  3. Choose whether the trigger should fire on "All Link Clicks" (all links) or "Some Link Clicks" (selected links only).
  4. If you selected "Some Link Clicks", add conditions such as:
    • Click URL contains tel: to track telephone-link clicks.
    • Click URL contains mailto: to track email-link clicks.
    • Click URL does not contain yourwebsite.com to track outbound links.

Step 3: Create a tracking tag, such as Google Analytics or Facebook Pixel

  1. Open the menu "Tags" and click "New".
  2. Choose the tag type, for example:
    • Google Analytics: GA4 Event to send a click event to GA4.
    • Facebook Pixel – Click Event to track clicks with Facebook Pixel.
  3. Under Triggering, select the trigger you created in the previous step.
  4. Click "Save".

Step 4: Test and publish

  1. Click "Preview" to enter debug mode.
  2. Click links on your website and check that the trigger fires correctly in GTM Preview.
  3. If everything works correctly, click "Submit" and then "Publish" to publish the changes.

Tip: You can add Tag Assistant for Google Chrome to check tag activity in real time.

Your trigger is now active, allowing you to monitor and analyse website link clicks.

Back to top ↑