{"id":158665,"date":"2025-03-26T23:49:22","date_gmt":"2025-03-26T23:49:22","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/ecommerce-tips-for-google-tag-manager\/"},"modified":"2025-03-26T23:49:22","modified_gmt":"2025-03-26T23:49:22","slug":"ecommerce-tips-for-google-tag-manager","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=158665","title":{"rendered":"eCommerce Tips For Google Tag Manager"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>I\u2019ve noticed that <a href=\"https:\/\/support.google.com\/tagmanager\/answer\/3002596?hl=en\">setting up eCommerce<\/a> in <a href=\"https:\/\/www.google.com\/tagmanager\">Google Tag Manager<\/a> (and now the new <a href=\"https:\/\/developers.google.com\/tag-manager\/enhanced-ecommerce\">Enhanced ecommerce<\/a>) is very difficult for many. I\u2019m sure part of the problem is that eCommerce is for many users the moment that GTM forces you to take steps in to the developer\u2019s domain, since it\u2019s obvious that you\u2019ll need to add some code to the web page.<\/p>\n<p>This isn\u2019t a tutorial on how to do eCommerce in Google Tag Manager. To get started, you\u2019ll want to check out the official documentation. Sure, it might be inaccurate in places, and especially the translations are lacking, but <code>dataLayer<\/code> form and function is nicely described within.<\/p>\n<p><a href=\"https:\/\/developers.google.com\/tag-manager\/enhanced-ecommerce\">Enhanced Ecommerce (UA) Developer Guide<\/a><br \/>\n<a href=\"https:\/\/support.google.com\/tagmanager\/answer\/3002596?hl=en\">Google Analytics Ecommerce<\/a><\/p>\n<p>This article has tips and answers to some frequently asked questions around eCommerce. Hopefully they will help you understand how eCommerce and Google Tag Manager work together.<\/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=\"the-process-in-a-nutshell\">The process in a nutshell<\/h2>\n<p>Here\u2019s how eCommerce and Google Tag Manager conspire to get you the all-important data of your web transactions.<\/p>\n<ol>\n<li>\n<p>Your <strong>eCommerce platform<\/strong> and\/or your <strong>Content Management Solution (CMS)<\/strong> render the source code<\/p>\n<\/li>\n<li>\n<p>If the page includes transactional information, this source code must include all required details about the transaction in the <code>dataLayer<\/code> object<\/p>\n<\/li>\n<li>\n<p>When the tag which carries the transaction to GA fires, it will look at the <code>dataLayer<\/code> object<\/p>\n<\/li>\n<li>\n<p>If it finds all the required information within, it will send the transaction hit to GA<\/p>\n<\/li>\n<\/ol>\n<div style=\"aspect-ratio: 1516 \/ 1141;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2014\/09\/ecommerce-process.jpg\" title=\"The eCommerce process in Google Tag Manager\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1141\" width=\"1516\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2014\/09\/ecommerce-process.jpg#ZgotmplZ\" alt=\"The eCommerce process in Google Tag Manager\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Most of the following chapters will shed more light on these points, but the key thing to remember is this:<\/p>\n<p><strong>Your eCommerce and\/or CMS platform do almost all the work in tracking your transactions.<\/strong><\/p>\n<p>The backend solution, whether it\u2019s your CMS or a dedicated eCommerce platform such as <a href=\"http:\/\/www.magentocommerce.com\/magento-connect\/google-tag-manager-3.html\">Magento<\/a>, or even a WordPress plugin (such as <a href=\"http:\/\/www.woothemes.com\/woocommerce\/\">WooCommerce<\/a>), has to do the grunt work of populating the keys in the data layer.<\/p>\n<p>With a Python-based application, the page template might look 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\">dataLayer.push({\n    <span style=\"color:#a50\">'transactionId'<\/span> : <span style=\"color:#a50\">'{{ transactionId }}'<\/span>,\n});\n<\/code><\/pre>\n<\/div>\n<p>With PHP, it might look 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\">dataLayer.push({\n    <span style=\"color:#a50\">'transactionId'<\/span> : <span style=\"color:#a50\">'<?php echo $transactionId ??>'<\/span>,\n});\n<\/code><\/pre>\n<\/div>\n<p>With QBASIC, it might look 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\">dataLayer.push({\n    <span style=\"color:#a50\">'transactionId'<\/span> : <span style=\"color:#a50\">'PRINT T$; GOTO END'<\/span>\n});\n<\/code><\/pre>\n<\/div>\n<p>OK, the QBASIC script was fictitious, I was trying to be funny. But nostalgia, right? Right?<\/p>\n<p>So don\u2019t expect GTM to come up with values for these variables magically. You will need a developer to help you here, and you will need a cooperative backend platform.<\/p>\n<p>Now, sometimes you might be tempted to scrape the DOM for eCommerce information. That means that you have some JavaScript in place which retrieves all the necessary transactional data from elements on the page, such as headings, body text, even image ALT texts.<\/p>\n<p><em>This is not the recommended approach!<\/em><\/p>\n<p>There are many, excellent reasons for decoupling semantic information (information with no inherent value to what is rendered in the browser document) from the presentational layer. This is what the data layer was invented for. I strongly suggest you avoid taking the seemingly easy path of scraping on-page elements, especially with business-critical transactional tags.<\/p>\n<p>Note, however, that some aspects of Enhanced eCommerce as it stands today might actually benefit from a combination of DOM scraping and <code>dataLayer<\/code> utilization. We\u2019ll go over this later in the post.<\/p>\n<p>Here are the actual tips:<\/p>\n<ol>\n<li>\n<p>dataLayer before GTM<\/p>\n<\/li>\n<li>\n<p>Use a custom event<\/p>\n<\/li>\n<li>\n<p>Make sure all the data is there<\/p>\n<\/li>\n<li>\n<p>Don\u2019t forget your JavaScript<\/p>\n<\/li>\n<li>\n<p>Enhanced eCommerce is special<\/p>\n<\/li>\n<\/ol>\n<p>And we\u2019ll wrap it up with a neat summary.<\/p>\n<h2 id=\"datalayer-before-gtm\">dataLayer before GTM<\/h2>\n<p>This is a very common problem. The tag that carries your transaction information fires <strong>before<\/strong> the transaction data is in <code>dataLayer<\/code>. D\u2019uh!<\/p>\n<p>When a tag fires, it has access to the <em>current state<\/em> of all variables in the global namespace. <code>dataLayer<\/code> is one of them. If <code>dataLayer<\/code> doesn\u2019t have the required variables on the moment that the transactional tag fires, you won\u2019t see data from that hit in GA.<\/p>\n<p>Here\u2019s an example. This is what your normal eCommerce tag looks like:<\/p>\n<div style=\"aspect-ratio: 749 \/ 470;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2014\/09\/transaction-tag.jpg\" title=\"transaction-tag\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"470\" width=\"749\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2014\/09\/transaction-tag.jpg#ZgotmplZ\" alt=\"transaction-tag\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>As you can see, there are VERY few options to work with. You just set Track Type to Transaction, add a rule, and you\u2019re good to go.<\/p>\n<p>The point is that this tag will fire as soon as the container snippet is loaded, i.e. when <a href=\"https:\/\/www.simoahava.com\/analytics\/container-snippet-gtm-secrets-revealed\/\">the container snippet<\/a> pushes <code>'event' : 'gtm.js'<\/code> into <code>dataLayer<\/code>. Because the tag looks into <code>dataLayer<\/code> for the transaction details, they have to be there by the time the tag fires!<\/p>\n<p>Thus, this will 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-html\" data-lang=\"html\">script&gt;\n  <span style=\"color:#0aa\">window<\/span>.dataLayer = <span style=\"color:#0aa\">window<\/span>.dataLayer || [];\n  dataLayer.push({\n    <span style=\"color:#a50\">'transactionId'<\/span>: <span style=\"color:#a50\">'1234'<\/span>,\n    <span style=\"color:#a50\">'transactionAffiliation'<\/span>: <span style=\"color:#a50\">'Acme Clothing'<\/span>,\n    <span style=\"color:#a50\">'transactionTotal'<\/span>: <span style=\"color:#099\">38.26<\/span>,\n    <span style=\"color:#a50\">'transactionTax'<\/span>: <span style=\"color:#099\">1.29<\/span>,\n    <span style=\"color:#a50\">'transactionShipping'<\/span>: <span style=\"color:#099\">5<\/span>,\n    <span style=\"color:#a50\">'transactionProducts'<\/span>: [{\n        <span style=\"color:#a50\">'sku'<\/span>: <span style=\"color:#a50\">'DD44'<\/span>,\n        <span style=\"color:#a50\">'name'<\/span>: <span style=\"color:#a50\">'T-Shirt'<\/span>,\n        <span style=\"color:#a50\">'category'<\/span>: <span style=\"color:#a50\">'Apparel'<\/span>,\n        <span style=\"color:#a50\">'price'<\/span>: <span style=\"color:#099\">11.99<\/span>,\n        <span style=\"color:#a50\">'quantity'<\/span>: <span style=\"color:#099\">1<\/span>\n    },{\n        <span style=\"color:#a50\">'sku'<\/span>: <span style=\"color:#a50\">'AA1243544'<\/span>,\n        <span style=\"color:#a50\">'name'<\/span>: <span style=\"color:#a50\">'Socks'<\/span>,\n        <span style=\"color:#a50\">'category'<\/span>: <span style=\"color:#a50\">'Apparel'<\/span>,\n        <span style=\"color:#a50\">'price'<\/span>: <span style=\"color:#099\">9.99<\/span>,\n        <span style=\"color:#a50\">'quantity'<\/span>: <span style=\"color:#099\">1<\/span>\n    }]\n  });\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;\n<span style=\"color:#aaa;font-style:italic\"><!-- Google Tag Manager --><\/span>\nnoscript&gt;iframe <span style=\"color:#1e90ff\">src<\/span>=<span style=\"color:#a50\">\"\/\/www.googletagmanager.com\/ns.html?id=GTM-P8XR\"<\/span>\n  <span style=\"color:#1e90ff\">height<\/span>=<span style=\"color:#a50\">\"0\"<\/span> <span style=\"color:#1e90ff\">width<\/span>=<span style=\"color:#a50\">\"0\"<\/span> <span style=\"color:#1e90ff\">style<\/span>=<span style=\"color:#a50\">\"display:none;visibility:hidden\"<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">iframe<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">noscript<\/span>&gt;\nscript&gt;(<span style=\"color:#00a\">function<\/span>(w,d,s,l,i){w[l]=w[l]||[];w[l].push({<span style=\"color:#a50\">'gtm.start'<\/span>:\n  <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime(),event:<span style=\"color:#a50\">'gtm.js'<\/span>});<span style=\"color:#00a\">var<\/span> f=d.getElementsByTagName(s)[<span style=\"color:#099\">0<\/span>],\n  j=d.createElement(s),dl=l!=<span style=\"color:#a50\">'dataLayer'<\/span>?<span style=\"color:#a50\">'&amp;l='<\/span>+l:<span style=\"color:#a50\">''<\/span>;j.async=<span style=\"color:#00a\">true<\/span>;j.src=\n  <span style=\"color:#a50\">'\/\/www.googletagmanager.com\/gtm.js?id='<\/span>+i+dl;f.parentNode.insertBefore(j,f);\n  })(<span style=\"color:#0aa\">window<\/span>,<span style=\"color:#0aa\">document<\/span>,<span style=\"color:#a50\">'script'<\/span>,<span style=\"color:#a50\">'dataLayer'<\/span>,<span style=\"color:#a50\">'GTM-P8XR'<\/span>);<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;\n<span style=\"color:#aaa;font-style:italic\"><!-- End Google Tag Manager --><\/span><\/code><\/pre>\n<\/div>\n<p>As you can see, the data is <strong>before<\/strong> the container snippet, so the <code>dataLayer<\/code> object is populated with all the required variables by the time the tag fires.<\/p>\n<p>However, this will NOT 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-html\" data-lang=\"html\"><span style=\"color:#aaa;font-style:italic\"><!-- Google Tag Manager --><\/span>;\nnoscript&gt;iframe <span style=\"color:#1e90ff\">src<\/span>=<span style=\"color:#a50\">\"\/\/www.googletagmanager.com\/ns.html?id=GTM-P8XR\"<\/span>\n<span style=\"color:#1e90ff\">height<\/span>=<span style=\"color:#a50\">\"0\"<\/span> <span style=\"color:#1e90ff\">width<\/span>=<span style=\"color:#a50\">\"0\"<\/span> <span style=\"color:#1e90ff\">style<\/span>=<span style=\"color:#a50\">\"display:none;visibility:hidden\"<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">iframe<\/span>&gt;<span style=\"color:#1e90ff;font-weight:bold\">noscript<\/span>&gt;\nscript&gt;(<span style=\"color:#00a\">function<\/span>(w,d,s,l,i){w[l]=w[l]||[];w[l].push({<span style=\"color:#a50\">'gtm.start'<\/span>:\n<span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime(),event:<span style=\"color:#a50\">'gtm.js'<\/span>});<span style=\"color:#00a\">var<\/span> f=d.getElementsByTagName(s)[<span style=\"color:#099\">0<\/span>],\nj=d.createElement(s),dl=l!=<span style=\"color:#a50\">'dataLayer'<\/span>?<span style=\"color:#a50\">'&amp;l='<\/span>+l:<span style=\"color:#a50\">''<\/span>;j.async=<span style=\"color:#00a\">true<\/span>;j.src=\n<span style=\"color:#a50\">'\/\/www.googletagmanager.com\/gtm.js?id='<\/span>+i+dl;f.parentNode.insertBefore(j,f);\n})(<span style=\"color:#0aa\">window<\/span>,<span style=\"color:#0aa\">document<\/span>,<span style=\"color:#a50\">'script'<\/span>,<span style=\"color:#a50\">'dataLayer'<\/span>,<span style=\"color:#a50\">'GTM-P8XR'<\/span>);<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;\n<span style=\"color:#aaa;font-style:italic\"><!-- End Google Tag Manager --><\/span>\nscript&gt;\n  dataLayer.push({\n    <span style=\"color:#a50\">'transactionId'<\/span>: <span style=\"color:#a50\">'1234'<\/span>,\n    <span style=\"color:#a50\">'transactionAffiliation'<\/span>: <span style=\"color:#a50\">'Acme Clothing'<\/span>,\n    <span style=\"color:#a50\">'transactionTotal'<\/span>: <span style=\"color:#099\">38.26<\/span>,\n    <span style=\"color:#a50\">'transactionTax'<\/span>: <span style=\"color:#099\">1.29<\/span>,\n    <span style=\"color:#a50\">'transactionShipping'<\/span>: <span style=\"color:#099\">5<\/span>,\n    <span style=\"color:#a50\">'transactionProducts'<\/span>: [{\n        <span style=\"color:#a50\">'sku'<\/span>: <span style=\"color:#a50\">'DD44'<\/span>,\n        <span style=\"color:#a50\">'name'<\/span>: <span style=\"color:#a50\">'T-Shirt'<\/span>,\n        <span style=\"color:#a50\">'category'<\/span>: <span style=\"color:#a50\">'Apparel'<\/span>,\n        <span style=\"color:#a50\">'price'<\/span>: <span style=\"color:#099\">11.99<\/span>,\n        <span style=\"color:#a50\">'quantity'<\/span>: <span style=\"color:#099\">1<\/span>\n    },{\n        <span style=\"color:#a50\">'sku'<\/span>: <span style=\"color:#a50\">'AA1243544'<\/span>,\n        <span style=\"color:#a50\">'name'<\/span>: <span style=\"color:#a50\">'Socks'<\/span>,\n        <span style=\"color:#a50\">'category'<\/span>: <span style=\"color:#a50\">'Apparel'<\/span>,\n        <span style=\"color:#a50\">'price'<\/span>: <span style=\"color:#099\">9.99<\/span>,\n        <span style=\"color:#a50\">'quantity'<\/span>: <span style=\"color:#099\">2<\/span>\n    }]\n  });\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p>This time, the transaction data is pushed <strong>after<\/strong> the container snippet has loaded, and there\u2019s a very strong possibility that the data is not rendered in <code>dataLayer<\/code> when the Transaction Tag fires.<\/p>\n<p>The same applies to any data you might try to move in a Custom HTML Tag. The Custom HTML Tag fires at its earliest with <strong>{{event}} equals gtm.js<\/strong>, because that\u2019s the <a href=\"https:\/\/www.simoahava.com\/gtm-tips\/gtmtips-rules-nutshell\/\">earliest possible event<\/a> to fire your tags on. However, your transaction tag is ALSO firing on that event, meaning there\u2019s a possibility that your transaction tag will fire first, and thus won\u2019t find the transaction details in <code>dataLayer<\/code>. You can try to rectify this with Tag Priority, but in this case it would be better to look at the next tip.<\/p>\n<h2 id=\"use-a-custom-event\">Use a custom event<\/h2>\n<p>If you can\u2019t push your data into <code>dataLayer<\/code> before <strong>{{event}} equals gtm.js<\/strong> fires, or if there\u2019s even the tiniest possibility that the data won\u2019t be rendered in time, you could just as well push a custom event of your own.<\/p>\n<p>For example, if you\u2019re using a Custom HTML Tag to build your eCommerce <code>dataLayer<\/code>, add an \u2018event\u2019 push in there, which you\u2019ll then use as the firing rule for your transactional tags:<\/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  dataLayer.push({\n    ... eCommerce properties ...,\n    <span style=\"color:#a50\">'event'<\/span> : <span style=\"color:#a50\">'transactionComplete'<\/span>\n  });\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p>Then your transactional tag needs to fire on <strong>{{event}} equals transactionComplete<\/strong>. This way you\u2019ll be 100 % certain that the data is in <code>dataLayer<\/code> by the time the tag fires, because the trigger event is pushed at the same times as the transactional data!<\/p>\n<h2 id=\"make-sure-all-the-data-is-there\">Make sure all the data is there<\/h2>\n<p>The developer guides tell you exactly what variables are required. In traditional eCommerce, here\u2019s what your Transaction Tag will look for:<\/p>\n<p><strong>Transaction ID<\/strong> &#8211; <code>transactionId<\/code><br \/>\n<strong>Transaction Total<\/strong> &#8211; <code>transactionTotal<\/code><br \/>\n<strong>Product Name<\/strong> &#8211; <code>name<\/code><br \/>\n<strong>Product SKU<\/strong> &#8211; <code>sku<\/code><br \/>\n<strong>Product Price<\/strong> &#8211; <code>price<\/code><br \/>\n<strong>Product Quantity<\/strong> &#8211; <code>quantity<\/code><\/p>\n<p>If any of these fields are missing from <code>dataLayer<\/code>, the Transaction Tag will not get sent.<\/p>\n<p>Oh, and also: <code>transactionId<\/code> and <code>sku<\/code> need to be unique. If you have multiple transactions with the same ID, or if you have many products with the same SKU, your data will be skewed.<\/p>\n<p>With Enhanced eCommerce, there are many more fields to observe, so be sure to read both the Google Tag Manager Developer Guide (linked to in the beginning of this post), as well as the general guide for <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/analyticsjs\/enhanced-ecommerce\">Enhanced eCommerce in Google Analytics<\/a>.<\/p>\n<h2 id=\"dont-forget-your-javascript\">Don\u2019t forget your JavaScript<\/h2>\n<p>We\u2019re in the developers\u2019 domain here. Don\u2019t forget that. Here are some things you should check first if your tags are not firing:<\/p>\n<p><strong>Each object key requires a value<\/strong> &#8211; If you want to omit a property from the push, either send it with an empty string, or drop it out of the push altogether. Don\u2019t send it without a value at all:<\/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\">dataLayer.push({\n  <span style=\"color:#a50\">'ecommerce'<\/span> : {\n    <span style=\"color:#a50\">'purchase'<\/span> : {\n      <span style=\"color:#a50\">'actionField'<\/span> : , <span style=\"color:#aaa;font-style:italic\">\/\/ WRONG! This key requires a value\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      ...\n});\ndataLayer.push({\n  <span style=\"color:#a50\">'ecommerce'<\/span> : {\n    <span style=\"color:#a50\">'purchase'<\/span> : {\n      <span style=\"color:#a50\">'actionField'<\/span> : <span style=\"color:#a50\">''<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ BETTER!\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      ...\n});\n<\/code><\/pre>\n<\/div>\n<p><strong>Know when to add a comma to the end of the line<\/strong> &#8211; If the properties are siblings of each other, that is, they have the same parent, then each line must end in a comma <strong>except<\/strong> the last line. Here\u2019s how it should go:<\/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\">dataLayer.push({\n  <span style=\"color:#a50\">'ecommerce'<\/span> : { <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, starts a new hierarchy\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    <span style=\"color:#a50\">'purchase'<\/span> : { <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, starts a new hierarchy\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      <span style=\"color:#a50\">'actionField'<\/span> : {<span style=\"color:#a50\">'list'<\/span> : <span style=\"color:#a50\">'Apparel Gallery'<\/span>}, <span style=\"color:#aaa;font-style:italic\">\/\/ Comma, followed by a sibling\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      <span style=\"color:#a50\">'products'<\/span> : [{ <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, starts a new hierarchy\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>        <span style=\"color:#a50\">'name'<\/span> : <span style=\"color:#a50\">'product1'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Comma, followed by a sibling\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>        <span style=\"color:#a50\">'id'<\/span> : <span style=\"color:#a50\">'12345'<\/span> <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, last member in current object\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      },{ <span style=\"color:#aaa;font-style:italic\">\/\/ Comma, since there are two objects in this 'products' Array \n<\/span><span style=\"color:#aaa;font-style:italic\"\/>        <span style=\"color:#a50\">'name'<\/span> : <span style=\"color:#a50\">'product2'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Comma, followed by a sibling\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>        <span style=\"color:#a50\">'id'<\/span> : <span style=\"color:#a50\">'23456'<\/span> <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, last member in current object\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>      }] <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, last member in current object\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    }  <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, last member in current object\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>  }, <span style=\"color:#aaa;font-style:italic\">\/\/ Comma, followed by a sibling\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>  <span style=\"color:#a50\">'event'<\/span> : <span style=\"color:#a50\">'transactionComplete'<\/span> <span style=\"color:#aaa;font-style:italic\">\/\/ No comma, last member in current object\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>});  \n<\/code><\/pre>\n<\/div>\n<p><strong>Respect the type requirements<\/strong> &#8211; Let\u2019s first address the elephant in the room. Always, <em>always<\/em> remember to use a period as the decimal separator in a number, not a comma. When passing a numeric value, the comma can be horribly misinterpreted:<\/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\">...\n<span style=\"color:#a50\">'price'<\/span> : <span style=\"color:#099\">33<\/span>,<span style=\"color:#099\">75<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ WRONG!\n<\/span><span style=\"color:#aaa;font-style:italic\"\/><span style=\"color:#a50\">'quantity'<\/span> : <span style=\"color:#099\">1<\/span>\n...\n<\/code><\/pre>\n<\/div>\n<p>Here, the browser interprets the first comma as the property separator, and the <code>75,<\/code> that follows is not a syntactically valid key-value pair, and will result in an error. Here\u2019s how it should look:<\/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\">...\n<span style=\"color:#a50\">'price'<\/span> : <span style=\"color:#099\">33.75<\/span>,\n<span style=\"color:#a50\">'quantity'<\/span> : <span style=\"color:#099\">1<\/span>\n...\n<\/code><\/pre>\n<\/div>\n<p>Now the number is actually a number, with a period as the decimal separator.<\/p>\n<p>With enhanced eCommerce, the type for price and other monetary values is confusingly <strong>Currency<\/strong>, which is not a JavaScript type, but just use a string with the decimal as the separator, e.g.<\/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\">dataLayer.push({\n  <span style=\"color:#a50\">'ecommerce'<\/span>: {\n    <span style=\"color:#a50\">'currencyCode'<\/span>: <span style=\"color:#a50\">'EUR'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Local currency, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    <span style=\"color:#a50\">'impressions'<\/span>: [\n     {\n       <span style=\"color:#a50\">'name'<\/span>: <span style=\"color:#a50\">'Triblend Android T-Shirt'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Name, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'id'<\/span>: <span style=\"color:#a50\">'12345'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ ID, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'price'<\/span>: <span style=\"color:#a50\">'15.25'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Price, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'brand'<\/span>: <span style=\"color:#a50\">'Google'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Brand, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'category'<\/span>: <span style=\"color:#a50\">'Apparel'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Category, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'variant'<\/span>: <span style=\"color:#a50\">'Gray'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ Variant, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'list'<\/span>: <span style=\"color:#a50\">'Search Results'<\/span>, <span style=\"color:#aaa;font-style:italic\">\/\/ List, type string\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>       <span style=\"color:#a50\">'position'<\/span>: <span style=\"color:#099\">1<\/span> <span style=\"color:#aaa;font-style:italic\">\/\/ Position, type number\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>     }]\n     ...\n<\/code><\/pre>\n<\/div>\n<p>So remember: respect the type requirements. A <code>number<\/code> is written as just the plain number, using a period as the decimal separator: <strong>15.35<\/strong>. No quotes there. A <code>string<\/code> is a combination of characters wrapped in single or double quotes: <strong>\u2018T-shirt\u2019<\/strong>.<\/p>\n<h2 id=\"enhanced-ecommerce-is-special\">Enhanced eCommerce is special<\/h2>\n<p>I\u2019ve alluded to Enhanced eCommerce a couple of times already, but now it\u2019s time to tackle the beast. If you thought there was a lot of <code>dataLayer<\/code> this and JavaScript that in the previous tips, you\u2019re going to overload with all the development effort that Enhanced eCommerce requires.<\/p>\n<p>Let\u2019s start with the obvious:<\/p>\n<p><strong>You do not use the Transaction tag type for Enhanced eCommerce<\/strong>.<\/p>\n<p>The Transaction tag is for traditional eCommerce, and as the <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/analyticsjs\/enhanced-ecommerce\">Enhanced eCommerce dev guide<\/a> clearly states:<\/p>\n<p><em>\u201cImportant: The Enhanced Ecommerce plug-in should not be used alongside the Ecommerce (ecommerce.js) plug-in for the same property.&#8221;<\/em><\/p>\n<p>So don\u2019t confuse the two. Enhanced eCommerce gives you a far more granular and funnel-like look at how visits progress in terms of your purchase funnel.<\/p>\n<p>The thing is, with Enhanced eCommerce all hits are piggy-backed on top of existing tags, such as Pageview and Event. The key is to remember to set Enhanced eCommerce features on in the settings of your tags, AND to use <code>dataLayer<\/code> to carry the data through the tag to Google. Again, you will need to make sure that <code>dataLayer<\/code> is initialized with all the required data before the tags fire.<\/p>\n<div style=\"aspect-ratio: 575 \/ 289;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2014\/10\/enable-enhanced.jpg\" title=\"Enable Enhanced eCommerce\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"289\" width=\"575\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2014\/10\/enable-enhanced.jpg#ZgotmplZ\" alt=\"Enable Enhanced eCommerce\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>With Enhanced eCommerce, all the previous tips apply tenfold. That\u2019s because there are so many more variables to appreciate, so many more type requirements to observe, so many more ways to get the data flowing to GA.<\/p>\n<p>Another important thing about the new feature is that any tag which has Enhanced eCommerce enabled will only process whatever was in the <strong>most recent<\/strong> \u2018ecommerce\u2019 variable push to the <code>dataLayer<\/code>. So if you have, for example:<\/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\">dataLayer.push({\n  <span style=\"color:#a50\">'ecommerce'<\/span> : {\n    <span style=\"color:#a50\">'impressions'<\/span> : ...\n  }\n});\ndataLayer.push({\n  <span style=\"color:#a50\">'ecommerce'<\/span> : {\n    <span style=\"color:#a50\">'detail'<\/span> : ...\n  }\n});\n<\/code><\/pre>\n<\/div>\n<p>Only the latter push will be processed by your tag which fires on <strong>{{event}} equals gtm.js<\/strong>. This is because the \u2018ecommerce\u2019 object is still processed with \u201cversion 1\u201d of the data layer, where repeated pushes of the same object name are <strong>not<\/strong> merged. Thus each new push overwrites the previous value of the object. In any case, it\u2019s crucial that you take this into account. What it means, in practice, is:<\/p>\n<p><strong>If you have many Enhanced eCommerce actions \/ items you need to send in a single tag, you must combine them in a single <code>dataLayer.push()<\/code>!<\/strong><\/p>\n<p>Needless to say, it will be practically impossible to implement eCommerce with the new features <em>without<\/em> involving your developers. After all, you are combining on-page actions (clicks, impressions) with the information in <code>dataLayer<\/code>. Even on the best of days, those two don\u2019t mix well.<\/p>\n<p>Here are some general tips for Enhanced eCommerce:<\/p>\n<ul>\n<li>\n<p><code>dataLayer<\/code> has a maximum length of 300 items. A search page on a large web store can have hundreds and hundreds of products, especially if you utilize lazy load methods, or something similar. So try to populate <code>dataLayer<\/code> with as much information pre-load as possible, and refrain from dynamically adding data into the structure.<\/p>\n<\/li>\n<li>\n<p>Sometimes the page elements might be dynamic. For example, you might need to account for sorting the items according to different criteria, or the same item might be in different categories, depending on what sort methods the user has chosen. In those cases you might need to scrape Page Category, for example, from the DOM, and push it into the product listing in the data model. Be sure to read <a href=\"https:\/\/www.simoahava.com\/analytics\/google-tag-manager-data-model\/\">this guide<\/a> for information how to update existing products in GTM\u2019s data layer.<\/p>\n<\/li>\n<li>\n<p>Start small and scale up, if the task seems too big to comprehend. Start with tracking the shopping cart, checkout funnel, and purchases. Next plan and implement the path from product impression, to product click, to product detail view. Finally, work yourself around promotions, campaigns, and refunds, if you wish.<\/p>\n<\/li>\n<li>\n<p>If you want to send multiple items using a single Enhanced eCommerce enabled GTM tag, you need to combine the items into a single push. Only the most recent <code>dataLayer.push()<\/code> with the \u2018ecommerce\u2019 key is processed by your Enhanced eCommerce enabled GTM tag! An even better practice is to always include an \u2018event\u2019 key in your post-container-snippet pushes, and use this \u2018event\u2019 key to fire your tag with every single \u2018ecommerce\u2019 push to <code>dataLayer<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"summary\">Summary<\/h2>\n<p>The trouble with eCommerce is that it\u2019s so deep in the developers\u2019 domain, but it involves a tool mainly directed at marketers. Naturally, this demands that communication between the technical and the non-technical stakeholders must flow naturally.<\/p>\n<p>Biggest problems occur when the developers do not understand eCommerce, its purposes, or how transactional information is passed through <code>dataLayer<\/code> into the analytics platform. Also, sometimes non-developers want to tackle eCommerce on their own, because they\u2019ve had success with the TMS thus far, and soon they\u2019ve bitten more than they can chew.<\/p>\n<p>The truth is that eCommerce requires a lot of knowledge transfer between the people who plan and the people who implement. Otherwise simple problems like failure to appreciate JavaScript type requirements, or what product details need to be represented in <code>dataLayer<\/code>, will cause errors.<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve noticed that setting up eCommerce in Google Tag Manager (and now the new Enhanced ecommerce) is very difficult for many. I\u2019m sure part of the problem is that eCommerce is for many users the moment that GTM forces you to take steps in to the developer\u2019s domain, since it\u2019s obvious that you\u2019ll need to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":158666,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[11161,1531,14495,1791,3535],"dealstore":[],"offerexpiration":[],"class_list":["post-158665","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-ecommerce","tag-google","tag-manager","tag-tag","tag-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>eCommerce Tips For Google Tag Manager - 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=158665\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"eCommerce Tips For Google Tag Manager - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"I\u2019ve noticed that setting up eCommerce in Google Tag Manager (and now the new Enhanced ecommerce) is very difficult for many. I\u2019m sure part of the problem is that eCommerce is for many users the moment that GTM forces you to take steps in to the developer\u2019s domain, since it\u2019s obvious that you\u2019ll need to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=158665\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-26T23:49:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1516\" \/>\n\t<meta property=\"og:image:height\" content=\"1141\" \/>\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=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=158665#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=158665\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"eCommerce Tips For Google Tag Manager\",\"datePublished\":\"2025-03-26T23:49:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=158665\"},\"wordCount\":2257,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=158665#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg\",\"keywords\":[\"ECommerce\",\"Google\",\"Manager\",\"TAG\",\"Tips\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=158665#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=158665\",\"url\":\"https:\/\/fivemor.com\/?p=158665\",\"name\":\"eCommerce Tips For Google Tag Manager - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=158665#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=158665#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg\",\"datePublished\":\"2025-03-26T23:49:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=158665#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=158665\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=158665#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg\",\"width\":1516,\"height\":1141},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=158665#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"eCommerce Tips For Google Tag Manager\"}]},{\"@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":"eCommerce Tips For Google Tag Manager - 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=158665","og_locale":"en_US","og_type":"article","og_title":"eCommerce Tips For Google Tag Manager - Som2ny Network","og_description":"I\u2019ve noticed that setting up eCommerce in Google Tag Manager (and now the new Enhanced ecommerce) is very difficult for many. I\u2019m sure part of the problem is that eCommerce is for many users the moment that GTM forces you to take steps in to the developer\u2019s domain, since it\u2019s obvious that you\u2019ll need to [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=158665","og_site_name":"Som2ny Network","article_published_time":"2025-03-26T23:49:22+00:00","og_image":[{"width":1516,"height":1141,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=158665#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=158665"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"eCommerce Tips For Google Tag Manager","datePublished":"2025-03-26T23:49:22+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=158665"},"wordCount":2257,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=158665#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg","keywords":["ECommerce","Google","Manager","TAG","Tips"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=158665#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=158665","url":"https:\/\/fivemor.com\/?p=158665","name":"eCommerce Tips For Google Tag Manager - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=158665#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=158665#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg","datePublished":"2025-03-26T23:49:22+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=158665#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=158665"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=158665#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ecommerce-process.jpg","width":1516,"height":1141},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=158665#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"eCommerce Tips For Google Tag Manager"}]},{"@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\/158665","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=158665"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/158665\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/158666"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=158665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=158665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=158665"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=158665"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=158665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}