{"id":104910,"date":"2025-02-23T09:04:19","date_gmt":"2025-02-23T09:04:19","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/gtmtips-tag-sequencing-with-custom-html-tags\/"},"modified":"2025-02-23T09:04:19","modified_gmt":"2025-02-23T09:04:19","slug":"gtmtips-tag-sequencing-with-custom-html-tags","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=104910","title":{"rendered":"#GTMTips: Tag Sequencing With Custom HTML Tags"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p><a href=\"https:\/\/www.simoahava.com\/analytics\/understanding-tag-sequencing-in-google-tag-manager\/\">Tag sequencing<\/a> was introdced to <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> in late 2015. Its main purpose was to facilitate the <em>sequential<\/em> firing of tags that have dependencies with each other. Due to the <a href=\"https:\/\/www.pluralsight.com\/guides\/introduction-to-asynchronous-javascript\">asynchronous<\/a> nature of third-party libraries like Google Tag Manager, it\u2019s difficult to establish an order of completion with tags that compete for their chance to fire.<\/p>\n<p>Tag sequencing changed this, as it allows you to establish <strong>setup<\/strong> and <strong>cleanup<\/strong> tags &#8211; the former firing <em>before<\/em> the main tag, and the latter <em>after<\/em>.<\/p>\n<p>Setting up tag sequencing is relatively easy, at least once you understand how it works. However, Custom HTML tags have some exceptional behavior, as you need to utilize certain specific commands to signal the sequence once the Custom HTML tag has completed its execution. This <a href=\"https:\/\/www.simoahava.com\/tags\/gtmtips\/\">#GTMTips<\/a> article aims to guide you with setting up Custom HTML tags in a tag sequence.<\/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<div style=\"aspect-ratio: 960 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2018\/07\/tag-sequencing-custom-html-tags.jpg\" title=\"Tag Sequencing With Custom HTML Tags\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"960\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2018\/07\/tag-sequencing-custom-html-tags.jpg#ZgotmplZ\" alt=\"Tag Sequencing With Custom HTML Tags\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h3 id=\"lesson-1-sequence-is-managed-with-the-success-and-failure-callbacks\">Lesson 1: Sequence is managed with the success and failure callbacks<\/h3>\n<p>The two callbacks, <code>onHtmlSuccess()<\/code> and <code>onHtmlFailure()<\/code> are what tag sequencing with Custom HTML tags really pivots around. The first is used to denote a place in the code when the code has finished running <em>successfully<\/em>, and execution can move to the next tag in the sequence. The second is used to signal when a <em>failure<\/em> happens, and here execution is also passed to the next tag in the sequence <strong>unless<\/strong> it has the <strong>failure toggle<\/strong> on:<\/p>\n<div style=\"aspect-ratio: 610 \/ 188;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2018\/07\/failure-sequencing.jpg\" title=\"Failure in Custom HTML tag\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"188\" width=\"610\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2018\/07\/failure-sequencing.jpg#ZgotmplZ\" alt=\"Failure in Custom HTML tag\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Just to recap (but be sure to read <a href=\"https:\/\/www.simoahava.com\/analytics\/understanding-tag-sequencing-in-google-tag-manager\/\">my guide<\/a> for a more thorough treatment), here\u2019s how you would set up a regular Custom HTML tag in a tag sequence, where both <em>success<\/em> and <em>failure<\/em> criteria are established.<\/p>\n<blockquote>\n<p><strong>NOTE!<\/strong> Remember to enable the <strong>Container ID<\/strong> and <strong>HTML ID<\/strong> <a href=\"https:\/\/www.simoahava.com\/analytics\/variable-guide-google-tag-manager\/#utilities\">built-in variables<\/a> for this.<\/p>\n<\/blockquote>\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:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">var<\/span> gtm = <span style=\"color:#0aa\">window<\/span>.google_tag_manager[{{Container ID}}]; <span style=\"color:#aaa;font-style:italic\">\/\/ Required\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>\t  \n  <span style=\"color:#0aa\">window<\/span>[<span style=\"color:#a50\">'something'<\/span>] = getSomethingElse();\n  <span style=\"color:#00a\">if<\/span> (<span style=\"color:#00a\">typeof<\/span> <span style=\"color:#0aa\">window<\/span>[<span style=\"color:#a50\">'something'<\/span>] !== <span style=\"color:#a50\">'undefined'<\/span>) {\n    gtm.onHtmlSuccess({{HTML ID}}); <span style=\"color:#aaa;font-style:italic\">\/\/ Success, move to next tag\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>  } <span style=\"color:#00a\">else<\/span> {\n    gtm.onHtmlFailure({{HTML ID}}); <span style=\"color:#aaa;font-style:italic\">\/\/ Failure, move to next tag unless it has failure toggle on\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>  }\n})();\n<\/code><\/pre>\n<\/div>\n<h3 id=\"lesson-2-the-success-and-failure-callbacks-arent-always-necessary\">Lesson 2: The success and failure callbacks aren\u2019t always necessary<\/h3>\n<p>Here\u2019s something I think most guides have missed: you don\u2019t <em>need<\/em> <code>onHtmlSuccess()<\/code> and <code>onHtmlFailure()<\/code> in your Custom HTML tag! The web browser executes all the code it finds in a Custom HTML tag from top-to-bottom before moving to the next item in the sequence.<\/p>\n<p>For example, if you\u2019ve setup the <a href=\"http:\/\/www.analytics-ninja.com\/blog\/2017\/05\/guide-facebook-pixel-google-tag-manager.html\">Facebook pixel<\/a> with Custom HTML tags, you don\u2019t need <code>onHtmlSuccess()<\/code> in the base pixel tag.<\/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:#00a\">function<\/span>(f,b,e,v,n,t,s){<span style=\"color:#00a\">if<\/span>(f.fbq)<span style=\"color:#00a\">return<\/span>;n=f.fbq=<span style=\"color:#00a\">function<\/span>(){n.callMethod?\nn.callMethod.apply(n,arguments):n.queue.push(arguments)};<span style=\"color:#00a\">if<\/span>(!f._fbq)f._fbq=n;\nn.push=n;n.loaded=!<span style=\"color:#099\">0<\/span>;n.version=<span style=\"color:#a50\">'2.0'<\/span>;n.queue=[];t=b.createElement(e);t.async=!<span style=\"color:#099\">0<\/span>;\nt.src=v;s=b.getElementsByTagName(e)[<span style=\"color:#099\">0<\/span>];s.parentNode.insertBefore(t,s)}(<span style=\"color:#0aa\">window<\/span>,\n<span style=\"color:#0aa\">document<\/span>,<span style=\"color:#a50\">'script'<\/span>,<span style=\"color:#a50\">'https:\/\/connect.facebook.net\/en_US\/fbevents.js'<\/span>);\n \nfbq(<span style=\"color:#a50\">'init'<\/span>, {{Facebook Pixel ID}});\n\n<span style=\"color:#aaa;font-style:italic\">\/\/ The following line is NOT necessary:\n<\/span><span style=\"color:#aaa;font-style:italic\">\/\/ window.google_tag_manager[{{Container ID}}].onHtmlSuccess({{HTML ID}}); \n<\/span><\/code><\/pre>\n<\/div>\n<p>Why is the last line not necessary? Because GTM would pass execution to the next tag <em>in any case<\/em> when it reaches the last line of this tag. The web browser runs code synchronously &#8211; there\u2019s no way it will stop in the middle of this tag and start working on the next tag.<\/p>\n<p>So the lesson is:<\/p>\n<p><strong>If you have code that is always run from top-to-bottom before moving to the next tag, you don\u2019t need <code>onHtmlSuccess()<\/code> and <code>onHtmlFailure()<\/code>.<\/strong><\/p>\n<p>But, and there\u2019s always a \u201cbut\u201d, you\u2019ll want to check the next lesson, too.<\/p>\n<h3 id=\"lesson-3-if-you-have-onhtmlfailure-youll-always-want-to-have-onhtmlsuccess-too\">Lesson 3: If you have <code>onHtmlFailure()<\/code>, you\u2019ll always want to have <code>onHtmlSuccess()<\/code>, too<\/h3>\n<p>If you use <code>onHtmlFailure()<\/code> to signal that at some point in the code an error is met and sequence should <em>not<\/em> proceed with the next tag (since you have the failure toggle on), you should also add <code>onHtmlSuccess()<\/code> somewhere in the code.<\/p>\n<p>This is because when you use the failure callback, GTM will not automatically proceed to the next tag anymore when it reaches the last line of the Custom HTML tag, even if you have the failure toggle turned off. By using <code>onHtmlFailure()<\/code>, you are telling Google Tag Manager to wait for either the <code>onHtmlFailure()<\/code> or <code>onHtmlSuccess()<\/code> before deciding whether to move to the next tag.<\/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:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">var<\/span> gtm = <span style=\"color:#0aa\">window<\/span>.google_tag_manager[{{Container ID}}];\n  \n  <span style=\"color:#00a\">if<\/span> (<span style=\"color:#00a\">true<\/span>) {\n    console.log(<span style=\"color:#a50\">'Worked!'<\/span>);\n  } <span style=\"color:#00a\">else<\/span> {\n    gtm.onHtmlFailure({{HTML ID}});\n  }\n})();\n<\/code><\/pre>\n<\/div>\n<p>In the above example, sequence will <strong>never<\/strong> proceed to the next tag. You have <code>onHtmlFailure()<\/code> which is <em>never<\/em> met (because <code>true<\/code> is always <code>true<\/code>), but you don\u2019t have <code>onHtmlSuccess()<\/code> anywhere. So only this first tag is run, and the sequence is never continued.<\/p>\n<p>This is one way it <strong>would<\/strong> work:<\/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:#00a\">if<\/span> (<span style=\"color:#00a\">true<\/span>) {\n  console.log(<span style=\"color:#a50\">'Worked'<\/span>);\n  gtm.onHtmlSuccess({{HTML ID}});\n} <span style=\"color:#00a\">else<\/span> {\n  gtm.onHtmlFailure({{HTML ID}});\n}\n<\/code><\/pre>\n<\/div>\n<p>This would also work (though it\u2019s not a good pattern), if the next tag in the sequence had the failure toggle off:<\/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:#00a\">if<\/span> (<span style=\"color:#00a\">true<\/span>) {\n  console.log(<span style=\"color:#a50\">'Worked'<\/span>);\n  gtm.onHtmlFailure({{HTML ID}});\n} <span style=\"color:#00a\">else<\/span> {\n  gtm.onHtmlFailure({{HTML ID}});\n}\n<\/code><\/pre>\n<\/div>\n<p>And since it\u2019s synchronous code, you can leave both callbacks out, and the sequence will proceed normally after logging <code>Worked<\/code> to the console in this case, too:<\/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:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">if<\/span> (<span style=\"color:#00a\">true<\/span>) {\n    console.log(<span style=\"color:#a50\">'Worked'<\/span>);\n  }\n})();\n<\/code><\/pre>\n<\/div>\n<h3 id=\"lesson-4-the-callbacks-are-at-their-best-in-asynchronous-operations\">Lesson 4: The callbacks are at their best in asynchronous operations<\/h3>\n<p>In my view, the <em>purpose<\/em> of tag sequencing is to establish order when the previous tag has an asynchronous operation. In other words, you want the browser to wait for the operation to complete before telling the next tag to start firing.<\/p>\n<p>For example, here we load the <a href=\"https:\/\/jquery.com\">jQuery<\/a> library asynchronously, waiting for it to have completely loaded before moving to the next tag:<\/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:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">var<\/span> gtm = <span style=\"color:#0aa\">window<\/span>.google_tag_manager[{{Container ID}}];\n  \n  <span style=\"color:#00a\">var<\/span> el = <span style=\"color:#0aa\">document<\/span>.createElement(<span style=\"color:#a50\">'script'<\/span>);\n  el.async = <span style=\"color:#00a\">true<\/span>;\n  el.src = <span style=\"color:#a50\">'https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.3.1\/jquery.min.js'<\/span>;\n  el.addEventListener(<span style=\"color:#a50\">'load'<\/span>, <span style=\"color:#00a\">function<\/span>() {\n    gtm.onHtmlSuccess({{HTML ID}});\n  });\n  <span style=\"color:#0aa\">document<\/span>.head.appendChild(el);\n})();\n<\/code><\/pre>\n<\/div>\n<p>As you can see, <code>onHtmlSuccess()<\/code> is embedded in the callback of the <a href=\"https:\/\/www.simoahava.com\/gtm-tips\/add-load-listener-script-elements\/\"><code>load<\/code> listener<\/a>, which is invoked only after the library has downloaded and the browser has executed the code within.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>Working with Custom HTML tags in a tag sequence has some <em>gotchas<\/em> you should be aware of, but there\u2019s really very little game-breaking. The biggest \u201cmistake\u201d I see people doing is adding the <code>onHtmlSuccess()<\/code> callback to the end of a synchronously executed block of code &#8211; this is not necessary <em>unless you have <code>onHtmlFailure()<\/code> somewhere in the code, too<\/em>.<\/p>\n<p>I hope that this article has clarified how Custom HTML tags and tag sequencing work together.<\/p>\n<p>Let me know in the comments if you have futher questions!<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Tag sequencing was introdced to Google Tag Manager in late 2015. Its main purpose was to facilitate the sequential firing of tags that have dependencies with each other. Due to the asynchronous nature of third-party libraries like Google Tag Manager, it\u2019s difficult to establish an order of completion with tags that compete for their chance [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":104913,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[834,14492,13834,48123,1791,1725],"dealstore":[],"offerexpiration":[],"class_list":["post-104910","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-custom","tag-gtmtips","tag-html","tag-sequencing","tag-tag","tag-tags"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#GTMTips: Tag Sequencing With Custom HTML Tags - 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=104910\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#GTMTips: Tag Sequencing With Custom HTML Tags - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Tag sequencing was introdced to Google Tag Manager in late 2015. Its main purpose was to facilitate the sequential firing of tags that have dependencies with each other. Due to the asynchronous nature of third-party libraries like Google Tag Manager, it\u2019s difficult to establish an order of completion with tags that compete for their chance [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=104910\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-23T09:04:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\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=104910#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=104910\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"#GTMTips: Tag Sequencing With Custom HTML Tags\",\"datePublished\":\"2025-02-23T09:04:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=104910\"},\"wordCount\":884,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=104910#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg\",\"keywords\":[\"Custom\",\"GTMTips\",\"HTML\",\"Sequencing\",\"TAG\",\"TAGS\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=104910#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=104910\",\"url\":\"https:\/\/fivemor.com\/?p=104910\",\"name\":\"#GTMTips: Tag Sequencing With Custom HTML Tags - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=104910#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=104910#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg\",\"datePublished\":\"2025-02-23T09:04:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=104910#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=104910\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=104910#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=104910#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#GTMTips: Tag Sequencing With Custom HTML Tags\"}]},{\"@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":"#GTMTips: Tag Sequencing With Custom HTML Tags - 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=104910","og_locale":"en_US","og_type":"article","og_title":"#GTMTips: Tag Sequencing With Custom HTML Tags - Som2ny Network","og_description":"Tag sequencing was introdced to Google Tag Manager in late 2015. Its main purpose was to facilitate the sequential firing of tags that have dependencies with each other. Due to the asynchronous nature of third-party libraries like Google Tag Manager, it\u2019s difficult to establish an order of completion with tags that compete for their chance [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=104910","og_site_name":"Som2ny Network","article_published_time":"2025-02-23T09:04:19+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.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=104910#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=104910"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"#GTMTips: Tag Sequencing With Custom HTML Tags","datePublished":"2025-02-23T09:04:19+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=104910"},"wordCount":884,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=104910#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg","keywords":["Custom","GTMTips","HTML","Sequencing","TAG","TAGS"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=104910#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=104910","url":"https:\/\/fivemor.com\/?p=104910","name":"#GTMTips: Tag Sequencing With Custom HTML Tags - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=104910#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=104910#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg","datePublished":"2025-02-23T09:04:19+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=104910#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=104910"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=104910#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/tag-sequencing-custom-html-tags.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=104910#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"#GTMTips: Tag Sequencing With Custom HTML Tags"}]},{"@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\/104910","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=104910"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/104910\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/104913"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104910"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=104910"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=104910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}