{"id":133944,"date":"2025-03-14T23:06:55","date_gmt":"2025-03-14T23:06:55","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/track-content-engagement-via-gtm\/"},"modified":"2025-03-14T23:06:55","modified_gmt":"2025-03-14T23:06:55","slug":"track-content-engagement-via-gtm","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=133944","title":{"rendered":"Track Content Engagement Via GTM"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>When looking at <a href=\"https:\/\/analytics.google.com\">Google Analytics<\/a> reports, you\u2019d think you get a pretty good idea of how people are interacting with your site, right? I mean, you\u2019re tracking events here, pageviews there, and user timings, custom dimensions, custom metrics, and calculated metrics are all part of your daily lingo. But you\u2019re also probably aware of how futile this tracking is. After all, all you\u2019re seeing are numbers that reflect certain outcomes the visitors have produced on the website, and how these outcomes match against your preconceived goals and objectives, right? It\u2019s difficult to wrap your head around the individual use cases that constantly take place on the site, and to draw overarching conclusions or unearth business trends on the basis of these data sets can be very problematic indeed.<\/p>\n<p>In anticipation of my upcoming talk at <a href=\"http:\/\/smxmuenchen.de\">SMX M\u00fcnchen<\/a>, I thought I\u2019d show a pretty nifty way of adjusting what <strong>content engagement<\/strong> means on an article-by-article basis, and how to encode this using <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a>.<\/p>\n<p>Since this blog is pretty much the only digital property I have a stake in, it\u2019s very important to me to uncover <strong>meaning<\/strong> in the content data I\u2019m looking at. I\u2019ve done this numerous times before in articles such as:<\/p>\n<p>And so on and so forth. But what I haven\u2019t yet tackled, at least not really, is <strong>how much time users are actually <em>spending engaged<\/em> with my content<\/strong>. In other words, I want to see something like this:<\/p>\n<div style=\"aspect-ratio: 2318 \/ 582;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/engagement.jpg\" title=\"Content engagement GA report\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"582\" width=\"2318\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/engagement.jpg#ZgotmplZ\" alt=\"Content engagement GA report\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>I\u2019m interested in knowing, among other things, out of <strong>all<\/strong> of the time users spend on the page, how much of it are they engaged with the page.<\/p>\n<p>!!! <strong>UPDATE<\/strong> !!!<br \/>\nI\u2019ve had to rewrite parts of this article due to a severe limitation in utilizing User Timings for data collection. Please read on until you reach step <strong>4. User Timings<\/strong>. At the beginning of that step is another <strong>UPDATE<\/strong>, where I link you to the <a href=\"https:\/\/www.simoahava.com\/analytics\/track-content-engagement-part-2\/\">revised version<\/a> of the article. The revised article picks up right after <strong>Step 3<\/strong> and takes you all the way to the end, so you don\u2019t have to jump back here unless you want to enjoy the comments.<br \/>\n!!! <strong>END UPDATE<\/strong> !!!<\/p>\n<p>Now, this is a very difficult topic to breach, so I had to ground it somewhere. Enter <a href=\"https:\/\/www.yle.fi\/\">Yleisradio<\/a> (YLE; Finnish Broadcasting Company) and <a href=\"https:\/\/chartbeat.com\">Chartbeat<\/a>.<\/p>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"yle-and-chartbeat\">YLE and Chartbeat<\/h2>\n<p>A week ago I had the pleasure of visiting some friends at YLE with a group of like-minded people, all interested in analytics. What Jaakko Ojalehto, Leevi Kokko, and Sami Mattila, the guys from YLE, showed us, was how they\u2019ve replicated <a href=\"https:\/\/chartbeat.com\/public-release-methodology\/\">Chartbeat\u2019s research<\/a> on engagement, and how they\u2019re utilizing this data to feed their reporters and journalists with more actionable data about how their content is faring on this enormous digital property.<\/p>\n<p>Chartbeat\u2019s research showed, among other things, that the engagement window of a single user averages at around 5 seconds. So after interacting with the page with clicks, mouse movements, keyboard presses, and scrolls, the user would stay engaged for another 5 seconds, before starting to idle or changing to another window or browser tab:<\/p>\n<blockquote><p>Chartbeat\u2019s JavaScript is constantly listening for acts of engagement on the in-focus webpage within an active browser (full list of events indicating engagement included below). These checks indicate when a user is actively engaged on the page and, based on a study conducted by Chartbeat, will likely remain so for five additional seconds.<\/p><\/blockquote>\n<p>As this quote from their \u201c<a href=\"https:\/\/chartbeat.com\/public-release-methodology\/\">Description of Methodology<\/a>\u201d page implies, <em>engagement<\/em> is something we can, and should, measure.<\/p>\n<p>So I wanted to replicate what the YLE guys have been doing while replicating what Chartbeat have been doing. And I wanted to provide a simple means of doing so via Google Tag Manager. Thus the rest of this blog post will cover the steps required to send timing data to Google Analytics, where you\u2019re measuring the cumulative time each visitor is <strong>engaged<\/strong> with any piece of content on your site.<\/p>\n<p>This will give you a better understanding of <em>active time spent on the page<\/em>, as the <strong>Average Time On Page<\/strong> just doesn\u2019t describe accurately the complexity of engagement. Time On Page is, after all, quite a <a href=\"http:\/\/cutroni.com\/blog\/2012\/02\/29\/understanding-google-analytics-time-calculations\/\">complex<\/a> and <a href=\"http:\/\/help.analyticsedge.com\/googleanalytics\/misunderstood-metrics-time-on-page-session-duration\/\">misleading<\/a> metric, even if there are some <a href=\"http:\/\/www.analytics-ninja.com\/blog\/2015\/02\/real-time-page-google-analytics.html\">excellent ways<\/a> to improve it.<\/p>\n<h2 id=\"what-youll-need\">What you\u2019ll need<\/h2>\n<p>To make it all work, you\u2019ll need:<\/p>\n<ol>\n<li>\n<p><strong>Custom HTML Tag<\/strong> (GTM) &#8211; To setup the script which measures engagement time<\/p>\n<\/li>\n<li>\n<p><strong>Custom Event Trigger<\/strong> (GTM) &#8211; To fire the User Timings Tag when the timings have been calculated<\/p>\n<\/li>\n<li>\n<p><strong>Data Layer Variable<\/strong> (GTM) &#8211; To pick up the time engaged from <code>dataLayer<\/code><\/p>\n<\/li>\n<li>\n<p><strong>User Timings Universal Analytics Tag<\/strong> (GTM) &#8211; To send the timing data to Google Analytics<\/p>\n<\/li>\n<li>\n<p><strong>Calculated Metric<\/strong> (GA) &#8211; To calculate the average time engaged per page<\/p>\n<\/li>\n<li>\n<p><strong>Custom Report<\/strong> (GA) &#8211; To display the data correctly<\/p>\n<\/li>\n<\/ol>\n<p>Note that there are some caveats to what you can do in Google Analytics, which depend on whether you\u2019re already using User Timings in your data collection. I\u2019ll get back to those when discussing the calculated metric you need to create.<\/p>\n<h2 id=\"1-custom-html-tag\">1. Custom HTML Tag<\/h2>\n<p>Create a new <strong>Custom HTML Tag<\/strong>, give it some fancy name, and copy-paste the following code within:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-html\" data-lang=\"html\">script&gt;\n  (<span style=\"color:#00a\">function<\/span>() {\n    <span style=\"color:#00a\">var<\/span> startEngage = <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime();\n    <span style=\"color:#00a\">var<\/span> timeEngaged = <span style=\"color:#099\">0<\/span>;\n    <span style=\"color:#00a\">var<\/span> idleTime = <span style=\"color:#099\">0<\/span>;\n    <span style=\"color:#00a\">var<\/span> idle = <span style=\"color:#00a\">true<\/span>;\n    <span style=\"color:#00a\">var<\/span> idleReport = <span style=\"color:#00a\">false<\/span>;\n    <span style=\"color:#00a\">var<\/span> idleTimer, reportTimer;\n    \n    <span style=\"color:#aaa;font-style:italic\">\/*  Set the user as idle, and calculate the time\n<\/span><span style=\"color:#aaa;font-style:italic\">        they were non-idle *\/<\/span>\n    <span style=\"color:#00a\">var<\/span> setIdle = <span style=\"color:#00a\">function<\/span>() {\n      idleTime = <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime();\n      timeEngaged += idleTime - startEngage;\n      idle = <span style=\"color:#00a\">true<\/span>;\n    };\n    \n    <span style=\"color:#aaa;font-style:italic\">\/*  Reset the 5 second idle timer.\n<\/span><span style=\"color:#aaa;font-style:italic\">        If the user was idle, start the non-idle timer *\/<\/span>\n    <span style=\"color:#00a\">var<\/span> pulse = <span style=\"color:#00a\">function<\/span>(evt) {\n      <span style=\"color:#00a\">if<\/span> (idle) {\n        idle = <span style=\"color:#00a\">false<\/span>;\n        startEngage = <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime();\n        idleReport = <span style=\"color:#00a\">false<\/span>;\n      }\n      <span style=\"color:#0aa\">window<\/span>.clearTimeout(idleTimer);\n      idleTimer = <span style=\"color:#0aa\">window<\/span>.setTimeout(setIdle, <span style=\"color:#099\">5000<\/span>); \n    };    \n    \n    <span style=\"color:#aaa;font-style:italic\">\/\/  Utility function for attaching listeners to the window\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    <span style=\"color:#00a\">var<\/span> addListener = <span style=\"color:#00a\">function<\/span>(evt, cb) {\n      <span style=\"color:#00a\">if<\/span> (<span style=\"color:#0aa\">window<\/span>.addEventListener) {\n        <span style=\"color:#0aa\">window<\/span>.addEventListener(evt, cb);\n      } <span style=\"color:#00a\">else<\/span> <span style=\"color:#00a\">if<\/span> (<span style=\"color:#0aa\">window<\/span>.attachEvent) {\n        <span style=\"color:#0aa\">window<\/span>.attachEvent(<span style=\"color:#a50\">'on'<\/span> + evt, cb);\n      }\n    };\n    \n    <span style=\"color:#aaa;font-style:italic\">\/* Push an event to dataLayer every 15 seconds\n<\/span><span style=\"color:#aaa;font-style:italic\">       unless the user is idle.\n<\/span><span style=\"color:#aaa;font-style:italic\">       Also, push an event when the user leaves the page *\/<\/span>\n    <span style=\"color:#00a\">var<\/span> report = <span style=\"color:#00a\">function<\/span>(evt) {\n      <span style=\"color:#00a\">if<\/span> (!idle) {\n        timeEngaged += <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime() - startEngage;\n      }\n\n      <span style=\"color:#aaa;font-style:italic\">\/\/ Push the payload to dataLayer, and only push valid time values\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      <span style=\"color:#00a\">if<\/span> (!idleReport &amp;&amp; timeEngaged &gt; <span style=\"color:#099\">0<\/span> &amp;&amp; timeEngaged 3600000) { \n\t    <span style=\"color:#0aa\">window<\/span>.dataLayer.push({\n    \t  <span style=\"color:#a50\">'event'<\/span> : <span style=\"color:#a50\">'nonIdle'<\/span>,\n          <span style=\"color:#a50\">'nonIdleTimeElapsed'<\/span> : timeEngaged\n        });\n      }\n      <span style=\"color:#00a\">if<\/span> (idle) {\n        idleReport = <span style=\"color:#00a\">true<\/span>;\n      }\n      \n      <span style=\"color:#aaa;font-style:italic\">\/\/ Fix possible beforeunload duplication problem\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      <span style=\"color:#00a\">if<\/span> (evt &amp;&amp; evt.type === <span style=\"color:#a50\">'beforeunload'<\/span>) {\n\t    <span style=\"color:#0aa\">window<\/span>.removeEventListener(<span style=\"color:#a50\">'beforeunload'<\/span>, report);\n      }\n      timeEngaged = <span style=\"color:#099\">0<\/span>;\n      startEngage = <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime();\n      reportTimer = <span style=\"color:#0aa\">window<\/span>.setTimeout(report, <span style=\"color:#099\">15000<\/span>);\n    };\n    \n    addListener(<span style=\"color:#a50\">'mousedown'<\/span>, pulse);\n    addListener(<span style=\"color:#a50\">'keydown'<\/span>, pulse);\n    addListener(<span style=\"color:#a50\">'scroll'<\/span>, pulse);\n    addListener(<span style=\"color:#a50\">'mousemove'<\/span>, pulse);\n    addListener(<span style=\"color:#a50\">'beforeunload'<\/span>, report);\n    idleTimer = <span style=\"color:#0aa\">window<\/span>.setTimeout(setIdle, <span style=\"color:#099\">5000<\/span>);\n    reportTimer = <span style=\"color:#0aa\">window<\/span>.setTimeout(report, <span style=\"color:#099\">15000<\/span>);\n  })();\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p>Let\u2019s take a look at the script, just briefly and superficially, so that you have an idea of what you\u2019re doing.<\/p>\n<p>At the very end, you have the following lines:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\">addListener(<span style=\"color:#a50\">'mousedown'<\/span>, pulse);\naddListener(<span style=\"color:#a50\">'keydown'<\/span>, pulse);\naddListener(<span style=\"color:#a50\">'scroll'<\/span>, pulse);\naddListener(<span style=\"color:#a50\">'mousemove'<\/span>, pulse);\naddListener(<span style=\"color:#a50\">'beforeunload'<\/span>, report);\nidleTimer = <span style=\"color:#0aa\">window<\/span>.setTimeout(setIdle, <span style=\"color:#099\">5000<\/span>);\nreportTimer = <span style=\"color:#0aa\">window<\/span>.setTimeout(report, <span style=\"color:#099\">15000<\/span>);\n<\/code><\/pre>\n<\/div>\n<p>Here, you\u2019re binding the events <strong>mousedown<\/strong> (when a mouse button is depressed), <strong>keydown<\/strong> (when a key is depressed), <strong>scroll<\/strong> (when the page is scrolled), and <strong>mousemove<\/strong> (when the mouse is moved) to send a <em>pulse<\/em> that the user is engaged. If there\u2019s a <strong>5000 millisecond<\/strong> (5 second) delay between pulses, the user is set as idle.<\/p>\n<p>Finally, every 15 seconds the cumulative engaged time is sent to Google Analytics, resetting the time engaged for the next 15 second stretch.<\/p>\n<p>So this is the heart of the script. The events are taken directly from Chartbeat\u2019s study, and nicely cover pretty much all of the ways in which the user can tell the browser they haven\u2019t fallen asleep. Whether or not they model <strong>engagement<\/strong> is another, more philosophical, question, but at least they model <strong>interaction<\/strong>.<\/p>\n<p>As you can see, mobile-specific events such as <strong>touchstart<\/strong> and <strong>touchend<\/strong> are missing. This is because, first of all, the way you interact with a page while reading on your phone is different from the idle doodling you do while using a mouse. Secondly, following Chartbeat\u2019s conclusions, creating arbitrary handlers for purely mobile browser events can be risky due to how browsers interpret touch interactions. So this is something to keep in mind when segmenting the data.<\/p>\n<p>The three methods we use, <code>setIdle<\/code>, <code>report<\/code>, and <code>pulse<\/code> are described here:<\/p>\n<ul>\n<li>\n<p><code>setIdle<\/code> sets the user as idle every 5 seconds of <strong>non-interaction<\/strong>. When the user is idle, the timer calculating engagement will be paused. Also, only the first \u201creport\u201d to <code>dataLayer<\/code> will be pushed. After that, nothing is pushed to <code>dataLayer<\/code> until the user starts engaging with the page again.<\/p>\n<\/li>\n<li>\n<p><code>report<\/code> pushes the current time engaged to <code>dataLayer<\/code>, and resets all necessary timers and variables.<\/p>\n<\/li>\n<li>\n<p><code>pulse<\/code> is what keeps the user \u201cactive\u201d. If the user was idle, it sets their idle status to <strong>false<\/strong>, and the 5 second idling timer is also reset at this point.<\/p>\n<\/li>\n<\/ul>\n<p>It might seem complicated (I sure hope it doesn\u2019t), but it\u2019s actually a very simple set of scripts.<\/p>\n<p>Set this Custom HTML Tag to fire on a <strong>Page View \/ DOM Ready<\/strong> Trigger. You want to start engagement calculations only after the page content can be interacted with.<\/p>\n<h2 id=\"2-custom-event-trigger\">2. Custom Event Trigger<\/h2>\n<p>To fire your User Timings Tag (coming to that soon) when the engagement time is pushed into <code>dataLayer<\/code> every 15 seconds, you only need a Custom Event Trigger. It should look like this:<\/p>\n<div style=\"aspect-ratio: 934 \/ 710;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/custom-event-trigger.jpg\" title=\"Custom Event Trigger\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"710\" width=\"934\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/custom-event-trigger.jpg#ZgotmplZ\" alt=\"Custom Event Trigger\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Hooray, that was easy.<\/p>\n<h2 id=\"3-data-layer-variable\">3. Data Layer Variable<\/h2>\n<p>You\u2019ll need to grab the time engaged from <code>dataLayer<\/code>, so create the following Data Layer Variable:<\/p>\n<div style=\"aspect-ratio: 780 \/ 930;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/data-layer-variable.jpg\" title=\"Data Layer Variable for time elapsed\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"930\" width=\"780\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/data-layer-variable.jpg#ZgotmplZ\" alt=\"Data Layer Variable for time elapsed\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Quite simple as well, right?<\/p>\n<h2 id=\"4-user-timings-tag\">4. User Timings Tag<\/h2>\n<p>!!! <strong>UPDATE<\/strong> !!!<br \/>\nUser Timings has one major flaw: it has a daily limit of <strong>10,000<\/strong> hits, which <em>includes Page Timings<\/em>. This means that if your site is even marginally at risk of collecting this many timings altogether, the rest of this article will not work for you. In fact, I strongly recommend you stop reading the rest of the steps here, and jump instead to the <a href=\"https:\/\/www.simoahava.com\/analytics\/track-content-engagement-part-2\/\">revised steps<\/a> I wrote, which utilize an Event Tag and a Custom Metric Tag. I\u2019m sorry for making you jump between texts, but the truth is that User Timings have proven to be a subpar data collection method, even if I think they\u2019re excellent in so many other ways. So, read the rest of this article at your own peril, as the actual average engagement you\u2019ll be collecting might well be very much off the mark.<br \/>\n!!! <strong>END UPDATE<\/strong> !!!<\/p>\n<p>So now you\u2019ll need a Tag which pulls all this information together, and dispatches it to Google Analytics.<\/p>\n<p>We\u2019ll use the amazing <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/analyticsjs\/user-timings\">User Timings<\/a> Tag Type for this. User Timings, if you didn\u2019t know, are just about the coolest feature of Google Analytics, and ridiculously useful for collecting arbitrary time measurements. I\u2019ve written about them before a number of times:<\/p>\n<p>So, create the Tag and make it look something like this:<\/p>\n<div style=\"aspect-ratio: 1580 \/ 1424;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/user-timings-tag.jpg\" title=\"User Timings Tag\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1424\" width=\"1580\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/user-timings-tag.jpg#ZgotmplZ\" alt=\"User Timings Tag\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Remember to set the <code>transport : beacon<\/code> field in the <strong>Fields to Set<\/strong>. This is a very useful, albeit poorly supported, feature of Google Analytics, which attempts to preserve any hits that are sent while the user is leaving the page. I have, of course, <a href=\"https:\/\/www.simoahava.com\/analytics\/leverage-usebeacon-beforeunload-google-analytics\/\">written about this before<\/a>, too.<\/p>\n<p>Make this User Timings Tag fire on the <strong>Custom Event Trigger<\/strong> you created earlier.<\/p>\n<p>And that\u2019s it for data collection! Now Google Tag Manager will send a User Timings hit to Google Analytics every 15 seconds, where the timing value will be the time the user spent interacting with the page during that 15 second stretch.<\/p>\n<p>Now we\u2019ll want to look at this data in Google Analytics, so that we can get an idea of how much people are interacting, by average, which each page on the site.<\/p>\n<h2 id=\"caveat\">Caveat<\/h2>\n<p>There\u2019s a very important caveat to discuss before proceeding. To calculate Average Engagement Time, you\u2019d want to calculate the <strong>total milliseconds spent engaged<\/strong> with the <strong>Pageviews<\/strong> for each page. Unfortunately, User Timings are not bound to a Pageview, as they exist as their own hit type. In other words, it\u2019s impossible to request <strong>only specific User timings per specific Pageviews<\/strong> in a calculated metric or by  using a custom report with report filters.<\/p>\n<p>So, the only way the following will work is if this is the <strong>only<\/strong> User Timing you\u2019re measuring, because then you can create a calculated metric which calculates the average of <strong>all<\/strong> User Timings per <strong>all<\/strong> Pageviews, giving you what we\u2019re after.<\/p>\n<p>If this isn\u2019t possible in your case, you might want to pull both Pageview and User Timings data out of Google Analytics, and join them together in Google Sheets or a tool like <a href=\"http:\/\/www.klipfolio.com\/\">Klipfolio<\/a>.<\/p>\n<p>If you have a good idea on how to circumvent this problem in Google Analytics, I\u2019m all ears. Using the default <strong>Avg. User Timing<\/strong> metric will not work, as that\u2019s bound to the size of the User Timing Sample, and not Pageviews. Using Custom Metrics <em>might<\/em> work, but I\u2019m having a hard time figuring out how to align them with Pageviews.<\/p>\n<h2 id=\"5-the-calculated-metric\">5. The Calculated Metric<\/h2>\n<p>Calculated Metrics are cool. No, they\u2019re awesome. They let you do calculations! On metrics! COOL AND AWESOME!<\/p>\n<p>Before you proceed, don\u2019t forget to checkout some of the amazing articles my friends have written about Calculated Metrics:<\/p>\n<p>Honestly, seems like anybody who\u2019s a somebody in web analytics has written about this feature, and that speaks heaps about how useful calculated metrics are!<\/p>\n<p>So, the metric we\u2019ll use will calculate the average user timing by the simple formula of <strong>total User Timing value<\/strong> \/ <strong>total Pageviews<\/strong>. Since the <strong>Time<\/strong> formatting type expects seconds as the input value, we\u2019ll need to divide the total user timings value by 1000 to convert milliseconds to the required format. Anyway, the metric setup looks like this:<\/p>\n<div style=\"aspect-ratio: 806 \/ 810;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/calculated-metric.jpg\" title=\"Calculated Metric\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"810\" width=\"806\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/calculated-metric.jpg#ZgotmplZ\" alt=\"Calculated Metric\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>To find this screen, go to your <strong>View Settings<\/strong> in GA Administration, and choose <strong>Calculated Metrics (BETA)<\/strong>. Next, click the ominous, big, red button labelled <strong>+ New Calculated Metric<\/strong>, and make sure the settings match with the screenshot above.<\/p>\n<h2 id=\"6-the-custom-report\">6. The Custom Report<\/h2>\n<p>Finally, let\u2019s pull it all together in a Custom Report. You can see a screenshot of the report itself at the beginning of this post, so here\u2019s what the report settings would look like:<\/p>\n<div style=\"aspect-ratio: 2358 \/ 870;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/custom-report.jpg\" title=\"Custom Report\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"870\" width=\"2358\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/custom-report.jpg#ZgotmplZ\" alt=\"Custom Report\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>I\u2019ve got <strong>Bounce Rate<\/strong> and <strong>Entrances<\/strong> there as well, so that I can get an idea of how sessions with these Page Views actually performed in terms of bounces and initial acquisition, but what\u2019s important is the juxtaposition of Page Views, Average Engagement, and Average Time On Page.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>Looking at Average Engagement versus Average Time On Page is illuminating. ATOP tells us how much time it took from one page view to another, but it doesn\u2019t tell us <strong>anything<\/strong> about the quality of that time. With Average Engagement, we\u2019re measuring the time user <strong>interacted<\/strong> with the page, i.e. kept it in focus and <strong>did<\/strong> something.<\/p>\n<p>Does this tell us anything about whether the user read the page or how they digested the contents? No, of course not. We\u2019d need a probe in their brain to uncover intent like that. But this data increases the significance and the <strong>meaning<\/strong> of the Time On Page metric, by describing actual, <em>interactive<\/em> time rather than just arbitrary time between two pageviews. It\u2019s a far more powerful indicator than any of the out-of-the-box metrics in Google Analytics, and a crucial cog in the machine you\u2019re building, whose job is to slowly, painfully open the lid on the can of worms, with the huge label of \u201cUSER INTENT\u201d plastered on the side.<\/p>\n<p>Again, huge thanks to the guys at YLE and to Chartbeat for the interesting and pioneering work they\u2019ve done. I hope the steps within this tutorial will help you in uncovering yet another interesting aspect of the users\u2019 browsing behavior on your site!<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>When looking at Google Analytics reports, you\u2019d think you get a pretty good idea of how people are interacting with your site, right? I mean, you\u2019re tracking events here, pageviews there, and user timings, custom dimensions, custom metrics, and calculated metrics are all part of your daily lingo. But you\u2019re also probably aware of how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":133945,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[7222,1748,32680,1018],"dealstore":[],"offerexpiration":[],"class_list":["post-133944","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-content","tag-engagement","tag-gtm","tag-track"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Track Content Engagement Via GTM - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=133944\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Track Content Engagement Via GTM - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"When looking at Google Analytics reports, you\u2019d think you get a pretty good idea of how people are interacting with your site, right? I mean, you\u2019re tracking events here, pageviews there, and user timings, custom dimensions, custom metrics, and calculated metrics are all part of your daily lingo. But you\u2019re also probably aware of how [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=133944\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-14T23:06:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2318\" \/>\n\t<meta property=\"og:image:height\" content=\"582\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=133944#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=133944\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Track Content Engagement Via GTM\",\"datePublished\":\"2025-03-14T23:06:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=133944\"},\"wordCount\":2401,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=133944#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg\",\"keywords\":[\"Content\",\"Engagement\",\"GTM\",\"Track\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=133944#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=133944\",\"url\":\"https:\/\/fivemor.com\/?p=133944\",\"name\":\"Track Content Engagement Via GTM - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=133944#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=133944#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg\",\"datePublished\":\"2025-03-14T23:06:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=133944#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=133944\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=133944#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg\",\"width\":2318,\"height\":582},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=133944#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Track Content Engagement Via GTM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Track Content Engagement Via GTM - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=133944","og_locale":"en_US","og_type":"article","og_title":"Track Content Engagement Via GTM - Som2ny Network","og_description":"When looking at Google Analytics reports, you\u2019d think you get a pretty good idea of how people are interacting with your site, right? I mean, you\u2019re tracking events here, pageviews there, and user timings, custom dimensions, custom metrics, and calculated metrics are all part of your daily lingo. But you\u2019re also probably aware of how [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=133944","og_site_name":"Som2ny Network","article_published_time":"2025-03-14T23:06:55+00:00","og_image":[{"width":2318,"height":582,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=133944#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=133944"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Track Content Engagement Via GTM","datePublished":"2025-03-14T23:06:55+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=133944"},"wordCount":2401,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=133944#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg","keywords":["Content","Engagement","GTM","Track"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=133944#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=133944","url":"https:\/\/fivemor.com\/?p=133944","name":"Track Content Engagement Via GTM - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=133944#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=133944#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg","datePublished":"2025-03-14T23:06:55+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=133944#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=133944"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=133944#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/engagement.jpg","width":2318,"height":582},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=133944#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Track Content Engagement Via GTM"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/133944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133944"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/133944\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/133945"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133944"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=133944"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=133944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}