{"id":6938,"date":"2024-06-21T17:58:51","date_gmt":"2024-06-21T17:58:51","guid":{"rendered":"https:\/\/lite14.net\/blog\/?p=6938"},"modified":"2024-06-22T05:18:59","modified_gmt":"2024-06-22T05:18:59","slug":"how-to-configure-google-tag-manager-for-single-page-applications-spas","status":"publish","type":"post","link":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/","title":{"rendered":"How to configure Google Tag Manager for single-page applications (SPAs)"},"content":{"rendered":"<p>Configuring Google Tag Manager (GTM) for single-page applications (SPAs) can be a bit more complex than traditional websites, but it&#8217;s still possible to track and analyze user behavior effectively. In this article, we&#8217;ll explore the challenges of SPAs and provide a step-by-step guide on how to configure GTM for SPAs.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#Challenges_of_SPAs_and_GTM\" >Challenges of SPAs and GTM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#1_Set_up_a_new_GTM_container\" >1. Set up a new GTM container<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#2_Create_a_dataLayer_variable\" >2. Create a dataLayer variable<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#3_Create_a_trigger\" >3. Create a trigger<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#4_Set_up_stags\" >4. Set up stags<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#5_Verify_and_Test\" >5. Verify and Test<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#Additional_Tips_and_Considerations\" >Additional Tips and Considerations<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Challenges_of_SPAs_and_GTM\"><\/span>Challenges of SPAs and GTM<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Single-page applications are designed to load a single HTML file and dynamically update the content using JavaScript, without requiring full page reloads. This approach has several implications for GTM:<\/p>\n<ol>\n<li><strong>No traditional page reloads<\/strong>: Since SPAs don&#8217;t reload the entire page, GTM&#8217;s traditional pageview tracking methods won&#8217;t work.<\/li>\n<li><strong>No traditional form submission<\/strong>: SPAs often use custom form submission mechanisms, making it difficult for GTM to detect form submissions.<\/li>\n<li><strong>Custom event tracking<\/strong>: SPAs often require custom event tracking to capture unique user interactions, such as clicks, scrolls, or hover events.<\/li>\n<li><strong>DataLayer limitations<\/strong>: SPAs often have complex dataLayer structures, which can make it challenging for GTM to accurately track events and variables.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Before configuring GTM for your SPA, make sure you have:<\/p>\n<ol>\n<li>A basic understanding of JavaScript and HTML<\/li>\n<li>Familiarity with Google Tag Manager (GTM) and its features<\/li>\n<li>Your SPA&#8217;s HTML, CSS, and JavaScript code<\/li>\n<\/ol>\n<p><strong>Step-by-Step Guide: Configuring GTM for SPAs<\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_Set_up_a_new_GTM_container\"><\/span>1. Set up a new GTM container<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Create a new GTM container by clicking on &#8220;New&#8221; in the top-left corner of the GTM interface.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"2_Create_a_dataLayer_variable\"><\/span>2. Create a dataLayer variable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>In your SPA&#8217;s JavaScript code, create a dataLayer variable to hold your application&#8217;s data. This will allow you to pass custom data to GTM.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"3_Create_a_trigger\"><\/span>3. Create a trigger<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Create a trigger that will fire on specific events in your SPA, such as clicks or form submissions.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"4_Set_up_stags\"><\/span>4. Set up stags<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Create tags that will be triggered by the events defined in your trigger.<\/p>\n<p><strong>Tracking Pageviews<\/strong><\/p>\n<ol>\n<li>Since SPAs don&#8217;t have traditional page reloads, you&#8217;ll need to use a custom tag to track pageviews.<\/li>\n<li>Create a custom tag for tracking pageview<\/li>\n<li>function <span class=\"hljs-title\">trackPageview<\/span>()<span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\"> {<\/span><\/li>\n<li>var <span class=\"hljs-keyword\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">event<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\"> = {<\/span>\u00a0<span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;event&#8217;<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">: <\/span><span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;pageview&#8217;<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">,<\/span>\u00a0<span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;pagePath&#8217;<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">: window.location.pathname<\/span>\u00a0 };dataLayer.push(<span class=\"hljs-keyword\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">event<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">);<\/span>}<\/li>\n<li>trackPageview();<\/li>\n<\/ol>\n<p><strong>Tracking Form Submissions<\/strong><\/p>\n<ol>\n<li>Create a custom tag to track form submissions, as traditional form submission tracking won&#8217;t work in SPAs.<\/li>\n<li>Create a custom tag for tracking form submissions<\/li>\n<li>function <span class=\"hljs-title\">track forms submission<\/span>()<span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\"> {<\/span>var <span class=\"hljs-keyword\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">event<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\"> = {<\/span>&#8216;event&#8217;<span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">: <\/span><span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;formSubmission&#8217;<\/span>\u00a0\u00a0<span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;formName&#8217;<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">: <\/span><span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;#myForm&#8217;<\/span>\u00a0 };<\/li>\n<li>\u00a0dataLayer.push(<span class=\"hljs-keyword\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">event<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">);<\/span><\/li>\n<li>document.getElementById(<span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;myForm&#8217;<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">).addEventListener(<\/span><span class=\"hljs-string\" style=\"color: #222222;font-family: Consolas, Monaco, monospace\">&#8216;submit&#8217;<\/span><span style=\"background-color: #e9ebec;color: #222222;font-family: Consolas, Monaco, monospace\">, trackFormSubmission);<\/span><\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"5_Verify_and_Test\"><\/span>5. Verify and Test<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Verify that your tags are firing correctly by checking the GTM debug logs or using the Chrome Extension.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Additional_Tips_and_Considerations\"><\/span>Additional Tips and Considerations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Use a reliable way to detect page changes<\/strong>: Since SPAs don&#8217;t have traditional page reloads, you&#8217;ll need to use a reliable way to detect page changes, such as checking for changes in the URL or scrolling events.<\/li>\n<li><strong>Use a consistent naming convention<\/strong>: Use a consistent naming convention for your variables and triggers to avoid confusion.<\/li>\n<li><strong>Test thoroughly<\/strong>: Thoroughly test your implementation to ensure that all tags are firing correctly and data is being sent to Google Analytics.<\/li>\n<\/ol>\n<p>Configuring Google Tag Manager for single-page applications requires careful planning and attention to detail. By following these steps and considering the unique challenges of SPAs, you can effectively track and analyze user behavior in your application. Remember to test thoroughly and adjust your implementation as needed to ensure accurate tracking and maximum ROI from your analytics efforts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configuring Google Tag Manager (GTM) for single-page applications (SPAs) can be a bit more complex than traditional websites, but it&#8217;s still possible to track and&#8230;<\/p>\n","protected":false},"author":210,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[270],"tags":[],"class_list":["post-6938","post","type-post","status-publish","format-standard","hentry","category-digital-marketing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to configure Google Tag Manager for single-page applications (SPAs) - Lite14 Tools &amp; Blog<\/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:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to configure Google Tag Manager for single-page applications (SPAs) - Lite14 Tools &amp; Blog\" \/>\n<meta property=\"og:description\" content=\"Configuring Google Tag Manager (GTM) for single-page applications (SPAs) can be a bit more complex than traditional websites, but it&#8217;s still possible to track and...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\" \/>\n<meta property=\"og:site_name\" content=\"Lite14 Tools &amp; Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-21T17:58:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-22T05:18:59+00:00\" \/>\n<meta name=\"author\" content=\"admin3\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin3\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\"},\"author\":{\"name\":\"admin3\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\"},\"headline\":\"How to configure Google Tag Manager for single-page applications (SPAs)\",\"datePublished\":\"2024-06-21T17:58:51+00:00\",\"dateModified\":\"2024-06-22T05:18:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\"},\"wordCount\":549,\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"articleSection\":[\"Digital Marketing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\",\"url\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\",\"name\":\"How to configure Google Tag Manager for single-page applications (SPAs) - Lite14 Tools &amp; Blog\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/#website\"},\"datePublished\":\"2024-06-21T17:58:51+00:00\",\"dateModified\":\"2024-06-22T05:18:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lite14.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to configure Google Tag Manager for single-page applications (SPAs)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lite14.net\/blog\/#website\",\"url\":\"https:\/\/lite14.net\/blog\/\",\"name\":\"Lite14 Tools &amp; Blog\",\"description\":\"Email Marketing Tools &amp; Digital Marketing Updates\",\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lite14.net\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lite14.net\/blog\/#organization\",\"name\":\"Lite14 Tools &amp; Blog\",\"url\":\"https:\/\/lite14.net\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png\",\"contentUrl\":\"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png\",\"width\":191,\"height\":178,\"caption\":\"Lite14 Tools &amp; Blog\"},\"image\":{\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\",\"name\":\"admin3\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g\",\"caption\":\"admin3\"},\"url\":\"https:\/\/lite14.net\/blog\/author\/adeyemoemmanuel001\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to configure Google Tag Manager for single-page applications (SPAs) - Lite14 Tools &amp; Blog","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:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/","og_locale":"en_US","og_type":"article","og_title":"How to configure Google Tag Manager for single-page applications (SPAs) - Lite14 Tools &amp; Blog","og_description":"Configuring Google Tag Manager (GTM) for single-page applications (SPAs) can be a bit more complex than traditional websites, but it&#8217;s still possible to track and...","og_url":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/","og_site_name":"Lite14 Tools &amp; Blog","article_published_time":"2024-06-21T17:58:51+00:00","article_modified_time":"2024-06-22T05:18:59+00:00","author":"admin3","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin3","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#article","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/"},"author":{"name":"admin3","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81"},"headline":"How to configure Google Tag Manager for single-page applications (SPAs)","datePublished":"2024-06-21T17:58:51+00:00","dateModified":"2024-06-22T05:18:59+00:00","mainEntityOfPage":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/"},"wordCount":549,"publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"articleSection":["Digital Marketing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/","url":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/","name":"How to configure Google Tag Manager for single-page applications (SPAs) - Lite14 Tools &amp; Blog","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/#website"},"datePublished":"2024-06-21T17:58:51+00:00","dateModified":"2024-06-22T05:18:59+00:00","breadcrumb":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/lite14.net\/blog\/2024\/06\/21\/how-to-configure-google-tag-manager-for-single-page-applications-spas\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lite14.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to configure Google Tag Manager for single-page applications (SPAs)"}]},{"@type":"WebSite","@id":"https:\/\/lite14.net\/blog\/#website","url":"https:\/\/lite14.net\/blog\/","name":"Lite14 Tools &amp; Blog","description":"Email Marketing Tools &amp; Digital Marketing Updates","publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lite14.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lite14.net\/blog\/#organization","name":"Lite14 Tools &amp; Blog","url":"https:\/\/lite14.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png","contentUrl":"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png","width":191,"height":178,"caption":"Lite14 Tools &amp; Blog"},"image":{"@id":"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81","name":"admin3","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g","caption":"admin3"},"url":"https:\/\/lite14.net\/blog\/author\/adeyemoemmanuel001\/"}]}},"_links":{"self":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/users\/210"}],"replies":[{"embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/comments?post=6938"}],"version-history":[{"count":5,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6938\/revisions"}],"predecessor-version":[{"id":6985,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6938\/revisions\/6985"}],"wp:attachment":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/media?parent=6938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/categories?post=6938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/tags?post=6938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}