{"id":131060,"date":"2025-03-13T16:18:21","date_gmt":"2025-03-13T16:18:21","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/measure-google-tag-manager-event-duration\/"},"modified":"2025-03-13T16:18:21","modified_gmt":"2025-03-13T16:18:21","slug":"measure-google-tag-manager-event-duration","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=131060","title":{"rendered":"Measure Google Tag Manager Event Duration"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p><a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> is a great tool. Yeah, you came all the way to this article to read that truism. It also performs really well, loading at a sweet, swift pace even on a slow connection, thanks to pretty decent response times from Google servers. On top of that, the library itself loads <em>asynchronously<\/em>, meaning the container download doesn\u2019t interrupt the browser as it tries to make sense of your messy HTML.<\/p>\n<div style=\"aspect-ratio: 1838 \/ 384;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/06\/gtm-js-load.jpg\" title=\"gtm.js library load\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"384\" width=\"1838\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/06\/gtm-js-load.jpg#ZgotmplZ\" alt=\"gtm.js library load\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>However, after the container has downloaded, the rest is up to you. The <a href=\"https:\/\/www.simoahava.com\/analytics\/trigger-guide-google-tag-manager\/\">Triggers<\/a> you attach to Tags, the <a href=\"https:\/\/www.simoahava.com\/analytics\/variable-guide-google-tag-manager\/\">Variables<\/a> you resolve in both Tags and Triggers, and all sorts of things like <a href=\"https:\/\/support.google.com\/tagmanager\/answer\/2772421?hl=en\">Tag Firing Priority<\/a> can potentially bog down your site simply because they all represent complex JavaScript operations. Just because code is executed in the Google Tag Manager container doesn\u2019t guarantee fast performance. The browser still needs to execute it line-by-line, using asynchronous requests where possible (such as when a call is made to the Google Analytics endpoint), but also relying on quite expensive operations such as DOM insertion.<\/p>\n<p>Anyway, being the experimenter that I aspire to be (how\u2019s that for a circular statement), I wanted to measure just how much time it takes for GTM events to resolve. Here\u2019s the result:<\/p>\n<div style=\"aspect-ratio: 956 \/ 372;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/06\/measure-gtm-event-performance.jpg\" title=\"GTM Event Performance report\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"372\" width=\"956\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/06\/measure-gtm-event-performance.jpg#ZgotmplZ\" alt=\"GTM Event Performance report\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Interesting stuff! Out of the largest timing samples, it\u2019s the most basic of events, <strong>gtm.js<\/strong>, which takes the longest time to complete! 2.5 seconds on average, phew! Here are the Tags on my site which fire on <strong>gtm.js<\/strong>:<\/p>\n<div style=\"aspect-ratio: 621 \/ 193;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/06\/gtm-js-tags.jpg\" title=\"gtm.js tags\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"193\" width=\"621\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/06\/gtm-js-tags.jpg#ZgotmplZ\" alt=\"gtm.js tags\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>There\u2019s a <a href=\"https:\/\/www.simoahava.com\/analytics\/access-the-tracker-object-in-your-page-view-tag\/\">tracker setup<\/a> Tag, a little <a href=\"https:\/\/www.simoahava.com\/gtm-tips\/add-konami-code-to-your-site\/\">Konami code<\/a> surprise, as well as some code to measure the <a href=\"https:\/\/www.simoahava.com\/analytics\/measure-serp-bounce-time-with-gtm\/\">SERP bounce time<\/a> on my site. Each one of them has some <code>dataLayer.push()<\/code> methods executed, and the tracker setup does load the <strong>analytics.js<\/strong> library, so it\u2019s not like it\u2019s lightweight stuff. But still, 2.5 seconds? That\u2019s a lifetime in Internet time!<\/p>\n<p>Anyway, this measurement has been quite eye-opening. It\u2019s a good idea to be aware of what happens behind the scenes. Even asynchronous operations can be harmful to page performance, especially if there are many of them running one after the another. The reason for this is that the <code>load<\/code> event for the <code>window<\/code> object is delayed until the page and all its related resources (e.g. scripts and images) have completely loaded. This might lead to problems with frameworks like <a href=\"https:\/\/facebook.github.io\/react\/\">React<\/a>, where many operations are executed only after the <code>window.onload<\/code> event has been dispatched in the browser.<\/p>\n<p>Let me quickly walk you through how I setup this measurement. It\u2019s not a walk in the park, and if you want to try it yourself I <em>urge<\/em> you to test it in a staging environment first!<\/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=\"lets-hack-the-data-layer\">Let\u2019s hack the Data Layer<\/h2>\n<p>To make it work, we need to hack the Data Layer.<\/p>\n<p>Queue ominous music.<\/p>\n<p>That\u2019s right, we need to do what Google Tag Manager <a href=\"https:\/\/www.simoahava.com\/analytics\/google-tag-manager-data-model\/\">has already done<\/a> and hijack the <code>dataLayer.push<\/code> method to overwrite it with our own.<\/p>\n<p>So, the following code needs to end up on your page template <em>before<\/em> the Google Tag Manager container snippet:<\/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:#0aa\">window<\/span>.dataLayer = <span style=\"color:#0aa\">window<\/span>.dataLayer || [];\n  <span style=\"color:#00a\">var<\/span> oldPush = <span style=\"color:#0aa\">window<\/span>.dataLayer.push;\n  <span style=\"color:#0aa\">window<\/span>.dataLayer.push = <span style=\"color:#00a\">function<\/span>() {\n    <span style=\"color:#00a\">var<\/span> e = [].slice.call(arguments, <span style=\"color:#099\">0<\/span>);\n    <span style=\"color:#00a\">if<\/span> (e[<span style=\"color:#099\">0<\/span>].event &amp;&amp; \n        e[<span style=\"color:#099\">0<\/span>].event !== <span style=\"color:#a50\">\"perfTime\"<\/span> &amp;&amp;\n        [<span style=\"color:#a50\">\"gtm.linkClick\"<\/span>,<span style=\"color:#a50\">\"gtm.formSubmit\"<\/span>,<span style=\"color:#a50\">\"gtm.timer\"<\/span>].indexOf(e[<span style=\"color:#099\">0<\/span>].event) === -<span style=\"color:#099\">1<\/span> &amp;&amp;\n        <span style=\"color:#0aa\">document<\/span>.readyState !== <span style=\"color:#a50\">\"complete\"<\/span>) {\n      <span style=\"color:#00a\">var<\/span> t = (<span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>).getTime(),\n          a = e[<span style=\"color:#099\">0<\/span>].event;\n      e[<span style=\"color:#099\">0<\/span>].eventStartTime = t,\n      e[<span style=\"color:#099\">0<\/span>].eventCallback = <span style=\"color:#00a\">function<\/span>(c){\n        <span style=\"color:#0aa\">window<\/span>.dataLayer.push(\n          {\n            event : <span style=\"color:#a50\">\"perfTime\"<\/span>,\n            <span style=\"color:#a50\">\"perfEvent.event\"<\/span> : a,\n            <span style=\"color:#a50\">\"perfEvent.totalTime\"<\/span> : (<span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>).getTime() - t,\n            <span style=\"color:#a50\">\"perfEvent.containerId\"<\/span> : c\n          }\n        )\n      }\n    }\n    \n    oldPush.apply(<span style=\"color:#0aa\">window<\/span>.dataLayer, e);\n\n  }\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p>Wow. That\u2019s a beast. I\u2019m not going to walk you through it line-by-line, but here\u2019s how it works:<\/p>\n<ul>\n<li>\n<p>When a <code>dataLayer.push()<\/code> happens, this code is first executed.<\/p>\n<\/li>\n<li>\n<p>It takes the object that was pushed, and if it contains an <code>'event'<\/code> key and if it matches some other conditions, the following code is then run:<\/p>\n<ul>\n<li>\n<p>A timer is started (the time when the event execution began) and stored in the key <code>eventStartTime<\/code><\/p>\n<\/li>\n<li>\n<p>The <code>[eventCallback](\/gtm-tips\/hitcallback-eventcallback\/)<\/code> of this object is set to a function, which basically pushes <em>another<\/em> <code>dataLayer<\/code> object, where a new timer calculates the difference between the event execution start and end times<\/p>\n<\/li>\n<li>\n<p>Finally, whatever was processed by this script (whether it be the modified object or the new \u201cperfTime\u201d object) is returned to the original <code>dataLayer.push<\/code> method, so that GTM can pick it up<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Ah, that IS a beast. Perhaps it\u2019s easier if I show you an example. When this code is running (i.e. before the page has completely loaded), a simple <code>dataLayer.push()<\/code> like this:<\/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\"><span style=\"color:#0aa\">window<\/span>.dataLayer.push({\n  <span style=\"color:#a50\">'event'<\/span> : <span style=\"color:#a50\">'testing'<\/span>,\n  <span style=\"color:#a50\">'someVar'<\/span> : <span style=\"color:#a50\">'someVal'<\/span>\n});\n<\/code><\/pre>\n<\/div>\n<p>\u2026is automatically turned into:<\/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\"><span style=\"color:#0aa\">window<\/span>.dataLayer.push({\n  <span style=\"color:#a50\">'event'<\/span> : <span style=\"color:#a50\">'testing'<\/span>,\n  <span style=\"color:#a50\">'someVar'<\/span> : <span style=\"color:#a50\">'someVal'<\/span>,\n  <span style=\"color:#a50\">'eventStartTime'<\/span> : <span style=\"color:#099\">1464890512708<\/span>,\n  <span style=\"color:#a50\">'eventCallback'<\/span> : <span style=\"color:#00a\">function<\/span>(e) {...}\n});\n<\/code><\/pre>\n<\/div>\n<p>And when all Tags which fire on <code>'event' : 'testing'<\/code> have completed their execution, the following is, again, automatically pushed into <code>dataLayer<\/code>:<\/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\"><span style=\"color:#0aa\">window<\/span>.dataLayer.push({\n  event : <span style=\"color:#a50\">'perfTime'<\/span>,\n  <span style=\"color:#a50\">'perfEvent.event'<\/span> : <span style=\"color:#a50\">'testing'<\/span>,\n  <span style=\"color:#a50\">'perfEvent.totalTime'<\/span> : <span style=\"color:#099\">421<\/span>,\n  <span style=\"color:#a50\">'perfEvent.containerId'<\/span> : <span style=\"color:#a50\">'GTM-W92WQQ'<\/span>\n});\n<\/code><\/pre>\n<\/div>\n<p>So my little hack is automatically measuring the time any <code>'event'<\/code> takes to complete, as long as it happens before the page has loaded (as that\u2019s the only performance I\u2019m interested in).<\/p>\n<p>By the way, you don\u2019t really need to add the <code>eventStartTime<\/code> into the object, as you already have a locally scoped variable <code>t<\/code> which stores the start time in a closure. However, I prefer to keep it there in case I want to do further debugging, since with the start time I can also build a waterfall model out of the performance times, to see how much execution of these different pre-load events overlap.<\/p>\n<p><strong>NOTE!!<\/strong> The script automatically excludes <strong>gtm.linkClick<\/strong>, <strong>gtm.timer<\/strong> and <strong>gtm.formSubmit<\/strong>, as these have their own uses for <code>eventCallback<\/code> (the <strong>Wait for Tags<\/strong> option). Similarly, if you\u2019re already using <code>eventCallback<\/code> with some events, be sure to add them to the Array of excluded events, or you might break your site!<\/p>\n<p>Remember to test first, please!<\/p>\n<p>The setup in GTM requires the following:<\/p>\n<ol>\n<li>\n<p>A <strong>Data Layer Variable<\/strong> named <strong>DLV &#8211; perfEvent.event<\/strong>, pointing to variable name <code>perfEvent.event<\/code><\/p>\n<\/li>\n<li>\n<p>A <strong>Data Layer Variable<\/strong> named <strong>DLV &#8211; perfEvent.totalTime<\/strong>, pointing to variable name <code>perfEvent.totalTime<\/code><\/p>\n<\/li>\n<li>\n<p>A <strong>Custom Event Trigger<\/strong> named <strong>Event &#8211; perfTime<\/strong>, with Event name set to <code>perfTime<\/code><\/p>\n<\/li>\n<li>\n<p>A <strong>Universal Analytics Tag<\/strong> of type <strong>Timing<\/strong> (see below)<\/p>\n<\/li>\n<\/ol>\n<p>Here\u2019s the Tag:<\/p>\n<div style=\"aspect-ratio: 953 \/ 670;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/06\/ua-timing-tag.jpg\" title=\"Universal Analytics Timing Tag\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"670\" width=\"953\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/06\/ua-timing-tag.jpg#ZgotmplZ\" alt=\"Universal Analytics Timing Tag\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>And this Tag will send your hits as User Timings, after which you\u2019ll find the report in Google Analytics, under <strong>Behavior -&gt; Site Speed -&gt; User Timings<\/strong>.<\/p>\n<p>I\u2019ve given User Timings a <a href=\"https:\/\/www.simoahava.com\/analytics\/track-content-engagement-part-2\/\">thrashing<\/a> before, since they\u2019re really useless for timing ALL the hits on the site. But if you\u2019re fine with just a sample, such as in this case, they work really well.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>Remember kids, good performance is good. Bad performance can kill\u2026 your site\u2019s user experience, and other stuff, too!<\/p>\n<p>However you want to do it, it\u2019s a good idea to keep an eye on the processes that take place before the <code>window<\/code> object has completely loaded on your site. You can use <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/analyticsjs\/user-timings\">User Timings<\/a> to measure all sorts of important milestones, such as just how long it takes for that awesome font library you paid hundreds of bucks for to download. Or how long your favorite JavaScript framework (rhymes with \u201clay brewery\u201d) hinders your page load times. Or how long it takes for you to reach the end of these articles of mine. Well, the last one might need some creativity, but I\u2019ll leave it in your capable hands!<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Google Tag Manager is a great tool. Yeah, you came all the way to this article to read that truism. It also performs really well, loading at a sweet, swift pace even on a slow connection, thanks to pretty decent response times from Google servers. On top of that, the library itself loads asynchronously, meaning [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":131061,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[15007,9252,1531,14495,16556,1791],"dealstore":[],"offerexpiration":[],"class_list":["post-131060","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-duration","tag-event","tag-google","tag-manager","tag-measure","tag-tag"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Measure Google Tag Manager Event Duration - 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=131060\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Measure Google Tag Manager Event Duration - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Google Tag Manager is a great tool. Yeah, you came all the way to this article to read that truism. It also performs really well, loading at a sweet, swift pace even on a slow connection, thanks to pretty decent response times from Google servers. On top of that, the library itself loads asynchronously, meaning [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=131060\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-13T16:18:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1838\" \/>\n\t<meta property=\"og:image:height\" content=\"384\" \/>\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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=131060#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=131060\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Measure Google Tag Manager Event Duration\",\"datePublished\":\"2025-03-13T16:18:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=131060\"},\"wordCount\":1144,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=131060#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg\",\"keywords\":[\"duration\",\"event\",\"Google\",\"Manager\",\"Measure\",\"TAG\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=131060#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=131060\",\"url\":\"https:\/\/fivemor.com\/?p=131060\",\"name\":\"Measure Google Tag Manager Event Duration - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=131060#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=131060#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg\",\"datePublished\":\"2025-03-13T16:18:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=131060#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=131060\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=131060#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg\",\"width\":1838,\"height\":384},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=131060#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Measure Google Tag Manager Event Duration\"}]},{\"@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":"Measure Google Tag Manager Event Duration - 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=131060","og_locale":"en_US","og_type":"article","og_title":"Measure Google Tag Manager Event Duration - Som2ny Network","og_description":"Google Tag Manager is a great tool. Yeah, you came all the way to this article to read that truism. It also performs really well, loading at a sweet, swift pace even on a slow connection, thanks to pretty decent response times from Google servers. On top of that, the library itself loads asynchronously, meaning [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=131060","og_site_name":"Som2ny Network","article_published_time":"2025-03-13T16:18:21+00:00","og_image":[{"width":1838,"height":384,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=131060#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=131060"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Measure Google Tag Manager Event Duration","datePublished":"2025-03-13T16:18:21+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=131060"},"wordCount":1144,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=131060#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg","keywords":["duration","event","Google","Manager","Measure","TAG"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=131060#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=131060","url":"https:\/\/fivemor.com\/?p=131060","name":"Measure Google Tag Manager Event Duration - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=131060#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=131060#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg","datePublished":"2025-03-13T16:18:21+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=131060#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=131060"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=131060#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/gtm-js-load.jpg","width":1838,"height":384},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=131060#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Measure Google Tag Manager Event Duration"}]},{"@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\/131060","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=131060"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/131060\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/131061"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131060"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=131060"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=131060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}