Are my texts being read? Implementing analytics in detail


On the occasion of the anniversary of the website Boosting (60th edition!), here is a deep dive on how to create a custom report on the texts read to the end. This is a supplement to my four-part series “Web Analytics: How Data Leads to Action”, in the 60th issue you will find the 3rd part. Basically, I had already written about the topic here in comparison to the scroll depth. This is an example of how custom and calculated metrics can be used.

The screenshot states per page:

  • How many words a text has
  • How many times a page has been viewed
  • The proportion of views that led to an exit
  • The number of visibility of the YARPP element (YARPP stands for Yet Another Related Posts Plugin), which displays similar articles at the end of an article. If this element is visible on the user’s screen, it is assumed that the article above the element has been completed)
  • The percentage of visibility of the YARPP element with respect to all page views
  • The number of clicks on a YARPP link
  • The percentage of clicks on a YARPP link in relation to the visibility of the element

What problem does this report solve?

  • If a text is read to the end less often than other texts, then this text does not seem to be written in such an interesting way.
  • The length of the text could be a predictor of whether a text is read to the end; but if a shorter text is not read to the end, this could be an even stronger signal that the text is in need of optimization.
  • If the links to similar articles are not clicked on even though they are visible, they do not seem to be relevant.

Create the custom dimension and metrics

  • In Analytics, go to Administration (bottom left) and then click Custom Definitions in the Property column.
  • Click on Custom Metrics and then click on the red New Custom Metrics button
  • Choose an understandable name (e.g. “YARPP Lakes”)
  • The Scope is Hit
  • The formatting type is integer
  • The remaining values can be left blank
  • Click Save.
  • Repeat the process once again, this time for the “YARPP Clicks”. The settings are the same.

The first entry should now have an index value of 1, and the second entry should have an index value of 2, unless user-defined variables have already been defined.

If the number of words in a text is also recorded, a user-defined dimension is required. The process is similar, here again select a suitable name and the scope hit. Again, the index value for this custom dimension needs to be remembered or noted, as it will be used later in Google Tag Manager.

Implementation in Google Tag Manager

Once the user-defined definitions and measured values have been implemented, values can now be written to these variables. This is done with the Tag Manager. First of all, the element must be selected on the page where the trigger of visibility should be triggered. The necessary steps for this are already described in this article. Then the following trigger is configured:

The trigger fires a tag, which now also has to be configured:

It is important in this step that the settings are overwritten, as this is the only way to pass a metric as a custom metric (Custom Metrics in the screenshot). Here you have to choose the index value that was defined by Analytics in the step above. The value of the measured value is 1 here, because for each sighting the counter jumps up by 1.

The Scroll Depth Threshold variable is not necessary, it may need to be configured first. This step must then be repeated again for the clicks on a YARPP link and, if applicable, for the custom dimension of the number of words per text. However, these can already be passed in the Google Analytics settings, which are defined as variables. In my case, the configuration looks like this:

As you can see, there are some things special about my configuration, but the WordCount is passed into a custom dimension with an index value of 7.

Creating the calculated metric

In order to display a ratio or conversion rate, a calculated metric is created. These are the columns “YARPP Seen CVR” and “YARPP Click CVR” in the example report in the first screenshot. Note: It may take some time for the custom metrics to be visible here! This means that this step may only be feasible after a few hours or even after a day.

In the Administration screen in the far right column, you will find the entry Calculated measured values. Click on the red button New Calculated Measured Value and then apply the following settings in the following screen. All you have to do is type in the first few letters of the variable name, and Analytics will complete the names. This is the setting for the Click CVR:

For the CVR lakes, the formula {{YARPP seen}} / {{pageviews}} is used.

Create the custom report

Last but not least, a report is now created, as can be seen in the first screenshot above. Under Customization (top left) and Custom Reports, a new report can be created. Here, all currently custom and relevant metrics available from board are selected and the appropriate dimension is selected. Unfortunately, no secondary dimension can be selected here; this must then be done manually when the custom report is invoked.

That’s it! Further valuable knowledge about web analysis can be found in my book “Introduction to Web Analysis”!