'}}

Measure external links with Google Tag Manager x GA4

At HanamiWEB Online School,

●Ask questions in real-time in the virtual study room!

●Ask as many questions as you want via chat!

●E-learning materials that you can learn as much as you want, 24 hours a day!

All included for just 2,500 yen/month!

I set up external link measurement using Google Tag Manager and GA4, so I'd like to introduce it to you.

You will be able to perform the following measurements without entering any code!

  • External link clicks
  • Number of external link clicks on each individual page
  • Which external links are being clicked on and how many times

Create a variable

First, click on the variable to set it.

Built-in variable settings

Click [Settings] for built-in variables.

Turn on all click elements.

  • Click Element
  • Click Classes
  • Click ID
  • Click Target
  • Click URL
  • Click Text

Trigger Settings

Next, set the trigger. Click [New] to create a new trigger.

Change the trigger name

Change the name to something more meaningful, then click the red edit icon once you've changed the name.

Trigger Type

For Trigger Type, select Link Only.

Check the necessary items

  • Wait for the tag to fire
  • Check for validity

Check these two items.

Set to target all pages on the site

Check the box and set the output items.

  • Page URL
  • Matches a regular expression
  • .* (dot asterisk)

Set your own site URL

Since we want to measure only external links, we will set it to measure URLs that do not include our own domain. Select some link clicks and set it.

  • Clock URL
  • Not included
  • Domain (in our case, the domain is hanami-web.tokyo.jp)

For internal links, you should [include] your own website's domain, but when measuring external links, it's important to [exclude] it!

Once you have completed the settings, click [Save].

Create a new tag

Finally, set the tag. Change the title to something more meaningful.

Tag configuration

Tag Settings: Select tag type

Google Analytics: Select GA4 Events.

Tag Settings: Set tags

Select [Google Analytics GA4 Settings].

Tag setting: Event name

Select a variable. Select [Click Text] or [Click URL].

Set the trigger you just set

Next, in the Trigger settings, select the trigger you just created.

Once you have completed the settings up to this point, click [Save].

Release

Just setting it up will not make it public, so click the [Publish] button in the upper right.

A version control screen will appear, so give it an easy-to-understand name, such as Add Meeting Link Measurement.

Check the event in GA4

Check if the event has been created in GA4.

  • Reports
  • engagement
  • event

It is located in the "Events" section. We have set up other events, so there are various events, but if they are reflected here, then the process is complete.

Linking measurement results to site improvements

Once external links are tracked using Google Tag Manager and GA4

  • Which page
  • Which external links

We will analyze which pages are being clicked and use that information to improve our site.

When you want to improve your site, we focus on web production and in-house development support using WordPress and no-code so that you can make quick changes in-house. If you are a web manager who wants to make in-house operations easier, please feel free to contact us for a free consultation!

Leave the reskilling of your website to us!

Since 2019, we have been sharing skills related to WordPress and websites. We have accumulated case studies and know-how, and are good at quickly and accurately solving problems. If you have any concerns about your website, please feel free to contact us via our official LINE account!

↑Click to open the official LINE page

Latest Articles

'}}
Explains how to customize the LifterLMS system automatic output page
'}}
LifterLMS Customization example when the registration date and active date are different due to bank transfer, etc.
'}}
(Solved) Emails sent from WordPress to Gmail are not being sent [Lollipop]
'}}
Explaining package (ticket) settings for the WordPress reservation system Amelia
WP Rocket - WordPress Caching Plugin
en_USEnglish