Track Inline Related Posts Clicks Using GTM on a WordPress Website

Inline Related Posts is a WordPress plugin which helps in increasing the blog engagement while reducing the bounce rate and increasing the page views at the same time. Many WordPress bloggers install this plugin hoping to increase the engagement and get the bounce rate reduced on their blog, however, they do not measure the data and see if this plugin is really working or not.

If you are using the paid or the pro version of this plugin then you might be getting all the data related to the blog engagement automatically provided by the plugin. On the other hand, if you are using the free version, then here are the steps to measure the page engagement by this plugin.

Track Inline Related Posts Clicks Using GTM

Below is the list of the steps that you need to follow.

 1. Set up a trigger to fire on all the single posts which contain “Also Read”

You need to make the trigger fire on all the individual single posts. Depending upon the URL and permalink structure, you need to create and define the trigger. Choose the following settings when creating a new trigger in the GTM.

  • Choose trigger type as Click – Just Links
  • Choose “Some Link Clicks” under “This Trigger fires on” and define your single post URL using regex match.

Since all of my single posts follow the URL pattern of domain.com/year/month/blog-name, it became easy for me to come up with a regex match of /201* because I started my blog in 2012 and this regex match with capture all the years. While writing this blog, I change the regex from /201* to /20* realizing that /201* will stop capturing data from 2019 onwards.

  • Also select Click Text, which is already a built-in variable in Google Tag Manager, to contain some text. To find that text, you need to go into the settings of Inline related posts plugin settings in your WordPress admin section.
  • There, you will find the common string that you are using in front of the links generated by the Inline related posts plugin.
  • For me, I use, Also read. So I put, Also read, in click text area as shown below.

Trigger for Tracking Inline related posts clicks

4. Setup the tag for links clicks

Use the settings below to configure the tag.

  • Select tag type as Google Analytics
  • Track type as Event
  • Category as Clicks

Note: I have decided to name the category as Clicks because I am using the same category name in Google Analytics to capture other events such as external link clicks etc. If you have some other preferred name for this category as per your Google Analytics settings then you can give that name otherwise naming the category as Clicks is fine.

  • Action as Also read clicks (or  as per your convenience)
  • Label as {{Page URL}} or you can also give as {{Page Path}} these are the inbuilt variables in GTM so it is easy to use. Otherwise, you can create a new user-defined variable and give that in the label.
  • Choose the {{GA ID}} in Google Analytics settings or the name that you have given to it.
  • Important: Select “Unlimited” under Tag firing Options

If you do not select this option then, this tag will fire just once. That means only one link click on any post will be captured. However, if a user clicks more than one inline related posts link, though the chances are very rare, in that case, the valid data might not be captured. And then select the trigger we created above as a part of the associated tag.

Define tags for also read clicks

5. Preview & debug

Once you had everything set up, go to the preview and debug mode and click some links provided by this plugin. As you can see below, I clicked on two links and you can see the line “Fired 2 time(s)” within the orange circled area. If you are not sure that everything is working fine then publish the tag.

Preview & debug

Alternatively, you can also check in the Google Analytics in the Real-time if that tag is being fired or not. Just go to the real-time and under that click on events (as shown below) and you can already see that under Clicks event category with the event action as Also Read Clicks which we defined above are being reflected in the Google analytics in the real-time.

Events in real time

Let me know if you are facing any issue. If you have already successfully implemented it, the next thing related to this plugin that you might want to dive deeper into will be to Track Inline Related Posts WordPress Plugin Performance in Google Analytics.

Have a Question? Get in Touch!



Leave a Reply

Your email address will not be published. Required fields are marked *