{"id":98430,"date":"2025-02-20T01:21:27","date_gmt":"2025-02-20T01:21:27","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/enhanced-ecommerce-object-builder-template-for-google-tag-manager\/"},"modified":"2025-02-20T01:21:27","modified_gmt":"2025-02-20T01:21:27","slug":"enhanced-ecommerce-object-builder-template-for-google-tag-manager","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=98430","title":{"rendered":"Enhanced Ecommerce Object Builder Template For Google Tag Manager"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>One of the cool things about <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/analyticsjs\/enhanced-ecommerce\">Enhanced Ecommerce<\/a> deployments in <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> is that you can use a <a href=\"https:\/\/www.simoahava.com\/analytics\/enhanced-ecommerce-guide-for-google-tag-manager\/#send-the-data-to-google-analytics-using-a-custom-javascript-variable\">Custom JavaScript variable<\/a> to generate the necessary data.<\/p>\n<p>There are many reasons to do so, with the biggest one being the flexibility it offers for manipulating the <code>dataLayer<\/code> object in case quick changes are required on the site, and it would take too long to wait for a new release of the site JavaScript.<\/p>\n<p>However, there\u2019s also the chance that you don\u2019t have access to a <code>dataLayer<\/code> implementation of Enhanced Ecommerce <em>at all<\/em>. This is not a very enjoyable situation, as you\u2019ll have to rely on things like DOM scraping to populate the necessary values.<\/p>\n<div style=\"aspect-ratio: 918 \/ 604;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/eec-object-builder.jpg\" title=\"Enhanced Ecommerce Object Builder\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"604\" width=\"918\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/eec-object-builder.jpg#ZgotmplZ\" alt=\"Enhanced Ecommerce Object Builder\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>To help with some of the pains of manipulating the <code>ecommerce<\/code> object in <code>dataLayer<\/code> <strong>and<\/strong> for generating an entire Enhanced Ecommerce implementation from scratch <em>without<\/em> <code>dataLayer<\/code>, I want to introduce a new <a href=\"https:\/\/www.simoahava.com\/analytics\/custom-templates-guide-for-google-tag-manager\/\">custom template<\/a> of mine: the <strong>Enhanced Ecommerce Object Builder<\/strong> variable template.<\/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=\"purpose\">Purpose<\/h2>\n<p>The template allows you to generate an Enhanced Ecommerce object from scratch. You can, of course, use Google Tag Manager variables to populate parts of the <code>ecommerce<\/code> object from <code>dataLayer<\/code> in the template itself (see in the screenshot above how the <strong>Currency Code<\/strong> field is populated with a variable).<\/p>\n<p>Any variable created with this template will then return a syntactically valid <code>ecommerce<\/code> object as its return value, which means that you\u2019ll need to have a tag that has the <strong>Enable Enhanced Ecommerce Features<\/strong> setting toggled on, and the respective variable selected from the list:<\/p>\n<div style=\"aspect-ratio: 788 \/ 253;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/enhanced-ecommerce-settings.jpg\" title=\"Enhanced Ecommerce settings\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"253\" width=\"788\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/enhanced-ecommerce-settings.jpg#ZgotmplZ\" alt=\"Enhanced Ecommerce settings\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Now, when this tag fires, it will pull in the <code>ecommerce<\/code> object generated by the variable (and the template code), and as a result, populate the hit to GA with the correct Enhanced Ecommerce parameters.<\/p>\n<div style=\"aspect-ratio: 572 \/ 305;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/eec-parameters.jpg\" title=\"Enhanced Ecommerce Parameters\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"305\" width=\"572\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/eec-parameters.jpg#ZgotmplZ\" alt=\"Enhanced Ecommerce Parameters\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h2 id=\"download-and-import-template\">Download and import template<\/h2>\n<p>To download the template, save the following file with the <code>.tpl<\/code> extension somewhere in your computer:<\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/sahava\/GoogleTagManagerTemplates\/master\/variables\/Enhanced%20Ecommerce%20Object%20Builder.tpl\">Enhanced Ecommerce Object Builder.tpl<\/a><\/p>\n<p>Then, use the instructions found <a href=\"https:\/\/www.simoahava.com\/analytics\/custom-templates-guide-for-google-tag-manager\/#importing-and-exporting\">here<\/a> to import the template into your container.<\/p>\n<div style=\"aspect-ratio: 505 \/ 185;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/template-import-menu.jpg\" title=\"Template import menu\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"185\" width=\"505\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/template-import-menu.jpg#ZgotmplZ\" alt=\"Template import menu\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h2 id=\"how-to-use-the-template\">How to use the template<\/h2>\n<p>First, you need to create a new <strong>User-defined Variable<\/strong> using the template. So head on over to <strong>Variables<\/strong>, click <strong>New<\/strong>, and choose the <strong>Enhanced Ecommerce Object Builder<\/strong> when prompted for the variable type.<\/p>\n<div style=\"aspect-ratio: 1046 \/ 203;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/new-variable.jpg\" title=\"New variable\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"203\" width=\"1046\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/new-variable.jpg#ZgotmplZ\" alt=\"New variable\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>An important thing to note is that <strong>all the text fields in the template accept Google Tag Manager variables<\/strong>. So if you want to populate some fields dynamically, you can.<\/p>\n<h3 id=\"enhanced-ecommerce-data-type\">Enhanced Ecommerce data type<\/h3>\n<p>The first selection you need to make is <strong>Type<\/strong>. The options are:<\/p>\n<ul>\n<li>\n<p>Promotion View<\/p>\n<\/li>\n<li>\n<p>Promotion Click<\/p>\n<\/li>\n<li>\n<p>Impression View<\/p>\n<\/li>\n<li>\n<p>Impression Click<\/p>\n<\/li>\n<li>\n<p>Product Detail View<\/p>\n<\/li>\n<li>\n<p>Add To Cart<\/p>\n<\/li>\n<li>\n<p>Remove From Cart<\/p>\n<\/li>\n<li>\n<p>Checkout<\/p>\n<\/li>\n<li>\n<p>Checkout Option<\/p>\n<\/li>\n<li>\n<p>Purchase<\/p>\n<\/li>\n<li>\n<p>Refund<\/p>\n<\/li>\n<\/ul>\n<p>If these choices look odd or unfamiliar, I urge you to read about them in <a href=\"https:\/\/www.simoahava.com\/analytics\/enhanced-ecommerce-guide-for-google-tag-manager\/#data-types-actions\">my Enhanced Ecommerce guide<\/a>.<\/p>\n<p>In case you selected <strong>Promotion View<\/strong>, <strong>Promotion Click<\/strong>, or <strong>Impression View<\/strong>, the <strong>Action Data<\/strong> and <strong>Product Data<\/strong> groups will disappear, as those three Enhanced Ecommerce data types do not support the sending of action and product data.<\/p>\n<h3 id=\"currency-code\">Currency Code<\/h3>\n<p>If you want to set a <a href=\"https:\/\/support.google.com\/analytics\/answer\/6205902?hl=en\">local currency<\/a> for the hit, you can set it by toggling the <strong>Set Currency Code<\/strong> checkbox and typing the currency code into the field that appears.<\/p>\n<h3 id=\"action-data\">Action Data<\/h3>\n<p><strong>Action Data<\/strong> is only available if you selected an Enhanced Ecommerce action as the tag type. This rules out <strong>Promotion Views<\/strong>, <strong>Promotion Clicks<\/strong> and <strong>Impression Views<\/strong>, which have their own settings in the template.<\/p>\n<p>Under <strong>Action Data<\/strong>, you\u2019ll see some options, depending on which type you selected.<\/p>\n<p>If you selected <strong>Checkout<\/strong> or <strong>Checkout Option<\/strong>, you\u2019ll see the fields for checkout step and option:<\/p>\n<div style=\"aspect-ratio: 503 \/ 301;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/checkout-options.jpg\" title=\"Checkout Options\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"301\" width=\"503\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/checkout-options.jpg#ZgotmplZ\" alt=\"Checkout Options\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>If you selected <strong>Purchase<\/strong> or <strong>Refund<\/strong>, you\u2019ll see the fields for a transaction:<\/p>\n<div style=\"aspect-ratio: 761 \/ 624;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/purchase-fields.jpg\" title=\"Purchase and refund fields\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"624\" width=\"761\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/purchase-fields.jpg#ZgotmplZ\" alt=\"Purchase and refund fields\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Regardless of which action you selected, you will always see the field where you can add the Product List:<\/p>\n<div style=\"aspect-ratio: 399 \/ 181;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/06\/product-list.jpg\" title=\"Product Action List\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"181\" width=\"399\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/06\/product-list.jpg#ZgotmplZ\" alt=\"Product Action List\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h3 id=\"product-data\">Product Data<\/h3>\n<p><strong>Product Data<\/strong> is only available if you selected an Enhanced Ecommerce action as the tag type. This rules out <strong>Promotion Views<\/strong>, <strong>Promotion Clicks<\/strong> and <strong>Impression Views<\/strong>, which have their own settings in the template.<\/p>\n<p>The Product Data group is split into three options. First, you have the products themselves. Second, you have the possibility to add Product-scoped Custom Dimensions. Finally, you can optionally add Product-scoped Custom Metrics.<\/p>\n<p><strong>Products<\/strong> are added by clicking the <strong>Add Product<\/strong> button. This opens an overlay where you can configure individual product settings.<\/p>\n<div style=\"aspect-ratio: 1655 \/ 727;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/07\/add-product-dialog.jpg\" title=\"Add Product dialog\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"727\" width=\"1655\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/07\/add-product-dialog.jpg#ZgotmplZ\" alt=\"Add Product dialog\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>You can add as many products as you wish, keeping in mind that there\u2019s an <a href=\"https:\/\/www.simoahava.com\/analytics\/send-google-analytics-payload-length-as-custom-dimension\/\">8192 byte<\/a> limit to the payload size of Google Analytics hits.<\/p>\n<p>Note also that not all the fields are necessary for all the action types.<\/p>\n<p><strong>Product-scoped Custom Dimensions<\/strong> are added by enabling Product-scoped Custom Dimensions by checking the relevant checkbox, and then inserting new rows into the table that appears.<\/p>\n<div style=\"aspect-ratio: 857 \/ 314;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/07\/product-scoped-dims.jpg\" title=\"Product-scoped Custom Dimensions\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"314\" width=\"857\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/07\/product-scoped-dims.jpg#ZgotmplZ\" alt=\"Product-scoped Custom Dimensions\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Add the index number of the Custom Dimensions to the <strong>Index<\/strong> column, and the value of the Custom Dimension to the <strong>Value<\/strong> column.<\/p>\n<p>In the <strong>Apply to SKUs<\/strong> field, you add the product IDs\/SKUs to which the custom dimension should apply. If you want the dimension to apply to all the fields in the hit, leave the <strong>Apply to SKUs<\/strong> field blank.<\/p>\n<p>As you can see from the screenshot above, you can add multiple rows with the same index as long as the <strong>Apply to SKUs<\/strong> field does not overlap. Otherwise, only the last value for any given index is sent to Google Analytics.<\/p>\n<p>Note also that you can add more than one SKU to the field. You can do this by separating the values with a comma: <code>shirts123,shirts1234<\/code>.<\/p>\n<p>Yes, this is a rather convoluted way to add custom dimensions to the products, but unfortunately there\u2019s no way to have a table of dynamic size (or really of any kind) as one of the fields in the <strong>Add Products<\/strong> table.<\/p>\n<p>The same process outlined above applies to <strong>Product-scoped Custom Metrics<\/strong>, too.<\/p>\n<div style=\"aspect-ratio: 861 \/ 268;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/07\/product-scoped-mets.jpg\" title=\"Product-scoped custom metrics\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"268\" width=\"861\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/07\/product-scoped-mets.jpg#ZgotmplZ\" alt=\"Product-scoped custom metrics\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h3 id=\"impressions-viewed\">Impressions Viewed<\/h3>\n<p>You can add <strong>Impressions<\/strong> to any Enhanced Ecommerce hit, regardless of hit type.<\/p>\n<div style=\"aspect-ratio: 894 \/ 658;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/07\/impression-views.jpg\" title=\"Impressions viewed\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"658\" width=\"894\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/07\/impression-views.jpg#ZgotmplZ\" alt=\"Impressions viewed\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Adding impression views and any Product-scoped Custom Dimensions and\/or Metrics related to them follows the exact same process as the one for regular products, so check out the previous chapter for a refresher. The main difference is that <code>list<\/code> is one of the fields you need to add to the impression data, so that the impression can be assigned to a specific product list.<\/p>\n<h3 id=\"promotions-viewed\">Promotions Viewed<\/h3>\n<p>You can add <strong>Promotion Views<\/strong> to any Enhanced Ecommerce hit, apart from <strong>Promotion Click<\/strong>.<\/p>\n<div style=\"aspect-ratio: 875 \/ 222;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/07\/promotion-viewed.jpg\" title=\"Promotions viewed\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"222\" width=\"875\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/07\/promotion-viewed.jpg#ZgotmplZ\" alt=\"Promotions viewed\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Promotion views are added simply by clicking the <strong>Add Promotion<\/strong> button, and then inputting values for <strong>ID<\/strong>, <strong>Name<\/strong>, <strong>Creative<\/strong>, and <strong>Position<\/strong>.<\/p>\n<h3 id=\"promotions-clicked\">Promotions Clicked<\/h3>\n<p>You can add <strong>Promotion Clicks<\/strong> if you\u2019ve selected <strong>Promotion Click<\/strong> as the action type.<\/p>\n<p>The clicked promotions are added exactly the same way as you would add viewed promotions, so see the previous chapter for reference.<\/p>\n<h2 id=\"testing-everything\">Testing everything<\/h2>\n<p>Once you\u2019ve created the variable and added it to a tag (see the chapter titled <a href=\"#purpose\">Purpose<\/a> for a refresher on how to do that), you\u2019ll need to test it works.<\/p>\n<p>The easiest way to test is by using a browser extension like <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/gtmga-debug\/ilnpmccnfdjdjjikgkefkcegefikecdc?hl=en\">GTM\/GA Debug<\/a> or <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/analytics-pros-datalayer\/kmcbdogdandhihllalknlcjfpdjcleom\">dataLayer Inspector+<\/a>. If everything works, you should see all the data added to the hit generated by the tag whose ecommerce settings you modified.<\/p>\n<div style=\"aspect-ratio: 1329 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/07\/gtm-ga-debug.jpg\" title=\"GTM\/GA Debug extension\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"1329\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/07\/gtm-ga-debug.jpg#ZgotmplZ\" alt=\"GTM\/GA Debug extension\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<h2 id=\"summary\">Summary<\/h2>\n<p>With this variable template, you should be able to build your custom Enhanced Ecommerce settings without the benefit of a fully-formed, syntactically valid <code>dataLayer<\/code> object. Naturally, having access to <code>dataLayer<\/code> for formatting the Enhanced Ecommerce data is almost invariably more reliable than building the payloads from scratch like this, but I do believe there to be use cases for a custom setup as well.<\/p>\n<p>Also, since you can add other GTM variables to almost all the fields of this template, you can use the <strong>Enhanced Ecommerce Object Builder<\/strong> to format and manipulate the data already in <code>dataLayer<\/code>.<\/p>\n<p>Let me know in the comments if you think there are features missing. One thing I\u2019d like to work on at some point is to let you provide an <code>ecommerce<\/code> object from <code>dataLayer<\/code> as the foundation for the variable, but then override individual fields and values of that object with this template.<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>One of the cool things about Enhanced Ecommerce deployments in Google Tag Manager is that you can use a Custom JavaScript variable to generate the necessary data. There are many reasons to do so, with the biggest one being the flexibility it offers for manipulating the dataLayer object in case quick changes are required on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":98431,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[8136,11161,14269,1531,14495,8544,1791,4196],"dealstore":[],"offerexpiration":[],"class_list":["post-98430","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-builder","tag-ecommerce","tag-enhanced","tag-google","tag-manager","tag-object","tag-tag","tag-template"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Enhanced Ecommerce Object Builder Template 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=98430\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enhanced Ecommerce Object Builder Template For Google Tag Manager - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"One of the cool things about Enhanced Ecommerce deployments in Google Tag Manager is that you can use a Custom JavaScript variable to generate the necessary data. There are many reasons to do so, with the biggest one being the flexibility it offers for manipulating the dataLayer object in case quick changes are required on [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=98430\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-20T01:21:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"918\" \/>\n\t<meta property=\"og:image:height\" content=\"604\" \/>\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=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=98430#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=98430\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Enhanced Ecommerce Object Builder Template For Google Tag Manager\",\"datePublished\":\"2025-02-20T01:21:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=98430\"},\"wordCount\":1360,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=98430#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg\",\"keywords\":[\"Builder\",\"ECommerce\",\"enhanced\",\"Google\",\"Manager\",\"Object\",\"TAG\",\"Template\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=98430#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=98430\",\"url\":\"https:\/\/fivemor.com\/?p=98430\",\"name\":\"Enhanced Ecommerce Object Builder Template For Google Tag Manager - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=98430#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=98430#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg\",\"datePublished\":\"2025-02-20T01:21:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=98430#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=98430\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=98430#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg\",\"width\":918,\"height\":604},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=98430#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enhanced Ecommerce Object Builder Template 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":"Enhanced Ecommerce Object Builder Template 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=98430","og_locale":"en_US","og_type":"article","og_title":"Enhanced Ecommerce Object Builder Template For Google Tag Manager - Som2ny Network","og_description":"One of the cool things about Enhanced Ecommerce deployments in Google Tag Manager is that you can use a Custom JavaScript variable to generate the necessary data. There are many reasons to do so, with the biggest one being the flexibility it offers for manipulating the dataLayer object in case quick changes are required on [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=98430","og_site_name":"Som2ny Network","article_published_time":"2025-02-20T01:21:27+00:00","og_image":[{"width":918,"height":604,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=98430#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=98430"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Enhanced Ecommerce Object Builder Template For Google Tag Manager","datePublished":"2025-02-20T01:21:27+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=98430"},"wordCount":1360,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=98430#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg","keywords":["Builder","ECommerce","enhanced","Google","Manager","Object","TAG","Template"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=98430#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=98430","url":"https:\/\/fivemor.com\/?p=98430","name":"Enhanced Ecommerce Object Builder Template For Google Tag Manager - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=98430#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=98430#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg","datePublished":"2025-02-20T01:21:27+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=98430#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=98430"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=98430#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/eec-object-builder.jpg","width":918,"height":604},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=98430#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Enhanced Ecommerce Object Builder Template 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\/98430","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=98430"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/98430\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/98431"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98430"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=98430"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=98430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}