{"id":100889,"date":"2025-02-21T05:38:58","date_gmt":"2025-02-21T05:38:58","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/gtmtips-use-enhanced-ecommerce-data-layer-with-facebook-pixel\/"},"modified":"2025-02-21T05:38:58","modified_gmt":"2025-02-21T05:38:58","slug":"gtmtips-use-enhanced-ecommerce-data-layer-with-facebook-pixel","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=100889","title":{"rendered":"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>A recurring question in the <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> communities (e.g. <a href=\"https:\/\/productforums.google.com\/forum\/#!categories\/tag-manager\">product forums<\/a>) is <strong>how to use an Enhanced Ecommerce <code>dataLayer<\/code> object with the <a href=\"https:\/\/www.facebook.com\/business\/help\/651294705016616\">Facebook pixel code<\/a><\/strong>? It\u2019s a common question since running a Facebook conversion pixel on a site that also collects data from the store into Google Analytics\u2019 <a href=\"https:\/\/www.simoahava.com\/analytics\/enhanced-ecommerce-guide-for-google-tag-manager\/\">Enhanced Ecommerce<\/a> reports is probably a very typical scenario.<\/p>\n<blockquote>\n<p>Side note: Since Google+ is about to go the way of the dodo, I\u2019ve created an <a href=\"https:\/\/gtm-archive.firebaseapp.com\/\">archive of the entire community<\/a> which you can browse and make text searches against.<\/p>\n<\/blockquote>\n<p>I\u2019ve shared a tip on this <a href=\"https:\/\/www.simoahava.com\/gtm-tips\/create-string-multiple-object-properties\/\">before<\/a>, but I think I need to be even more specific and give concrete examples how to populate the various properties of the Facebook pixel object.<\/p>\n<p>For a guide on how to implement the Facebook pixel, check out Yehoshua\u2019s amazing <a href=\"http:\/\/www.analytics-ninja.com\/blog\/2017\/05\/guide-facebook-pixel-google-tag-manager.html\">Facebook Pixel with Google Tag Manager guide<\/a>.<\/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=\"tip-95-use-the-facebook-pixel-with-an-enhanced-ecommerce-data-layer\">Tip 95: Use the Facebook Pixel with an Enhanced Ecommerce Data Layer<\/h2>\n<div style=\"aspect-ratio: 960 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/02\/enhanced-ecommerce-facebook-pixel.jpg\" title=\"Enhanced Ecommerce with the Facebook Pixel\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"960\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/02\/enhanced-ecommerce-facebook-pixel.jpg#ZgotmplZ\" alt=\"Enhanced Ecommerce with the Facebook Pixel\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The solution here is to create an <strong>API<\/strong> that you can pass your Enhanced Ecommerce products array to, and it will return the array all reduced and converted to the various formats required by the Facebook Pixel.<\/p>\n<p>First things first, you need to <strong>create the Custom JavaScript variable<\/strong>.<\/p>\n<ol>\n<li>\n<p>Create a new <strong>Custom JavaScript variable<\/strong> in the GTM UI.<\/p>\n<\/li>\n<li>\n<p>Name it <code>{{EECFB API}}<\/code> (or something less of an abomination, if you wish).<\/p>\n<\/li>\n<li>\n<p>Add the following code within:<\/p>\n<\/li>\n<\/ol>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\"><span style=\"color:#00a\">function<\/span>() {\n  <span style=\"color:#00a\">return<\/span> <span style=\"color:#00a\">function<\/span>(products) {\n    <span style=\"color:#00a\">if<\/span> (!<span style=\"color:#0aa\">Array<\/span>.isArray(products)) {\n      <span style=\"color:#00a\">return<\/span>;\n    }\n    \n    <span style=\"color:#00a\">var<\/span> idList = products.map(<span style=\"color:#00a\">function<\/span>(prod) {\n      <span style=\"color:#00a\">return<\/span> !!prod.id &amp;&amp; prod.id.toString();\n    });\n    \n    <span style=\"color:#00a\">var<\/span> totalValue = products.reduce(<span style=\"color:#00a\">function<\/span>(acc, cur) {\n      <span style=\"color:#00a\">return<\/span> !!cur.price &amp;&amp; !!cur.quantity ? acc + (cur.price * cur.quantity) : acc;\n    }, <span style=\"color:#099\">0<\/span>);\n    \n    <span style=\"color:#00a\">var<\/span> totalQuantity = products.reduce(<span style=\"color:#00a\">function<\/span>(acc, cur) {\n      <span style=\"color:#00a\">return<\/span> !!cur.quantity ? acc + <span style=\"color:#0aa\">parseInt<\/span>(cur.quantity) : acc;\n    }, <span style=\"color:#099\">0<\/span>);\n    \n    <span style=\"color:#00a\">var<\/span> contentsArray = products.map(<span style=\"color:#00a\">function<\/span>(prod) {\n      <span style=\"color:#00a\">return<\/span> {\n        id: !!prod.id ? prod.id.toString() : <span style=\"color:#00a\">undefined<\/span>,\n        item_price: !!prod.price ? <span style=\"color:#0aa\">parseFloat<\/span>(prod.price) : <span style=\"color:#00a\">undefined<\/span>,\n        quantity: !!prod.quantity ? <span style=\"color:#0aa\">parseInt<\/span>(prod.quantity) : <span style=\"color:#00a\">undefined<\/span>\n      };\n    });\n    \n    <span style=\"color:#00a\">return<\/span> {\n      content_ids: idList,\n      value: totalValue,\n      num_items: totalQuantity,\n      contents: contentsArray\n    };\n  };\n}\n<\/code><\/pre>\n<\/div>\n<p>This code actually <strong>returns<\/strong> a function, so it\u2019s basically a wrapper for a <strong>closure<\/strong>, which you can then call in your other tags using a parameter.<\/p>\n<p>When you invoke this API in a Custom HTML tag, for example, you need to have a variable reference to the <code>products<\/code> array at hand to pass to this API as a parameter (I\u2019ll show you an example soon).<\/p>\n<p>The API returns an object with four properties:<\/p>\n<table>\n<thead>\n<tr>\n<th>Property<\/th>\n<th>Description<\/th>\n<th>Sample output<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>content_ids<\/code><\/td>\n<td>Array of all the Product IDs.<\/td>\n<td><code>['id123', 'id234', 'id345']<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>value<\/code><\/td>\n<td>The sum of all the product prices multiplied by their respective quantities.<\/td>\n<td><code>63.55<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>num_items<\/code><\/td>\n<td>The sum of all the quantities in the array.<\/td>\n<td><code>5<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>contents<\/code><\/td>\n<td>The products array converted to the format Facebook requires.<\/td>\n<td><code>[{id: 'id123', quantity: 2, item_price: 10.2}]<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"how-to-put-it-all-together\">How to put it all together<\/h3>\n<p>Let\u2019s take the Facebook <strong>Purchase<\/strong> event as an example. Here\u2019s what you\u2019d need to do.<\/p>\n<p>First, let\u2019s say this is what your Enhanced Ecommerce <strong>purchase<\/strong> object looks like:<\/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\">ecommerce: {\n  purchase: {\n    products: {\n\t  actionField: {...},\n\t  products: [{\n        id: <span style=\"color:#a50\">'shirt1'<\/span>, \n        name: <span style=\"color:#a50\">'T-Shirt'<\/span>, \n        price: <span style=\"color:#a50\">'15.99'<\/span>, \n        quantity: <span style=\"color:#099\">2<\/span>\n      },{\n        id: <span style=\"color:#a50\">'pants2'<\/span>, \n        name: <span style=\"color:#a50\">'Pants'<\/span>, \n        price: <span style=\"color:#a50\">'9.99'<\/span>, \n        quantity: <span style=\"color:#099\">3<\/span>\n      }]\n    }\n  }\n}\n<\/code><\/pre>\n<\/div>\n<ol>\n<li>\n<p>First, create a Data Layer variable for variable name <code>ecommerce.purchase.products<\/code> and name it <code>{{ecommerce.purchase.products}}<\/code>. This is the reference to the products in your Enhanced Ecommerce purchase object.<\/p>\n<\/li>\n<li>\n<p>Create a Custom HTML tag that fires after your Facebook pixel has been initialized.<\/p>\n<\/li>\n<li>\n<p>This is what the contents might look like:<\/p>\n<\/li>\n<\/ol>\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:#00a\">function<\/span>() {\n    <span style=\"color:#aaa;font-style:italic\">\/\/ Get reference to the Enhanced Ecommerce products\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>\t<span style=\"color:#00a\">var<\/span> prods = {{ecommerce.purchase.products}};\n\t\n\t<span style=\"color:#aaa;font-style:italic\">\/\/ Poll the custom Facebook API with this array\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>\t<span style=\"color:#00a\">var<\/span> fbObj = {{EECFB API}}(prods);\n\t\n\t<span style=\"color:#aaa;font-style:italic\">\/\/ Create the FB pixel call\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>\t<span style=\"color:#00a\">if<\/span> (<span style=\"color:#00a\">typeof<\/span> <span style=\"color:#0aa\">window<\/span>.fbq === <span style=\"color:#a50\">'function'<\/span>) {\n\t  <span style=\"color:#0aa\">window<\/span>.fbq(<span style=\"color:#a50\">'track'<\/span>, <span style=\"color:#a50\">'Purchase'<\/span>, {\n        value: fbObj.value,\n        content_ids: fbObj.content_ids,\n        contents: fbObj.contents,\n        num_items: fbObj.num_items\n\t  });\n\t}\n  })();\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p>It\u2019s an imaginary situation &#8211; you wouldn\u2019t typically send the Facebook Purchase event with that payload.<\/p>\n<p>Anyway, what happens here is that first you fetch a reference to the <code>products<\/code> array in the Enhanced Ecommerce purchase object. Then, you call the <code>{{EECFB API}}<\/code> passing that array as the parameter. The API returns an object, which you store in the <code>fbObj<\/code> local variable.<\/p>\n<p>Then, you simply access the properties of this object (listed in the table earlier in this article) in the <code>fbq()<\/code> call. That\u2019s how you build the required pixel call with all the necessary parameters.<\/p>\n<p>So, the <code>window.fbq()<\/code> method is <strong>actually<\/strong> called with these values:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\"><span style=\"color:#0aa\">window<\/span>.fbq(<span style=\"color:#a50\">'track'<\/span>, <span style=\"color:#a50\">'Purchase'<\/span>, {\n  value: <span style=\"color:#099\">61.95<\/span>,\n  content_ids: [<span style=\"color:#a50\">'shirt1'<\/span>, <span style=\"color:#a50\">'pants2'<\/span>],\n  contents: [{\n    id: <span style=\"color:#a50\">'shirt1'<\/span>, \n    item_price: <span style=\"color:#099\">15.99<\/span>, \n    quantity: <span style=\"color:#099\">2<\/span>\n  },{\n    id: <span style=\"color:#a50\">'pants2'<\/span>, \n    item_price: <span style=\"color:#099\">9.99<\/span>, \n    quantity: <span style=\"color:#099\">3<\/span>\n  }],\n  num_items: <span style=\"color:#099\">5<\/span>\n});\n<\/code><\/pre>\n<\/div>\n<h2 id=\"summary\">Summary<\/h2>\n<p>What you\u2019re creating here is a <strong>helper<\/strong> function that automatically chews up your Enhanced Ecommerce products and spits out the values in a format required by the Facebook pixel.<\/p>\n<p>You can freely extend the variable with other properties, and adapting it to other source object formats should be quite simple to do, too.<\/p>\n<p>In any case, let me know in the comments if you think the API needs some other properties, or if you need help in extending it!<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>A recurring question in the Google Tag Manager communities (e.g. product forums) is how to use an Enhanced Ecommerce dataLayer object with the Facebook pixel code? It\u2019s a common question since running a Facebook conversion pixel on a site that also collects data from the store into Google Analytics\u2019 Enhanced Ecommerce reports is probably a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":100891,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[11603,11161,14269,15100,14492,564,24001],"dealstore":[],"offerexpiration":[],"class_list":["post-100889","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-data","tag-ecommerce","tag-enhanced","tag-facebook","tag-gtmtips","tag-layer","tag-pixel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel - 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=100889\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"A recurring question in the Google Tag Manager communities (e.g. product forums) is how to use an Enhanced Ecommerce dataLayer object with the Facebook pixel code? It\u2019s a common question since running a Facebook conversion pixel on a site that also collects data from the store into Google Analytics\u2019 Enhanced Ecommerce reports is probably a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=100889\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-21T05:38:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=100889#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=100889\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel\",\"datePublished\":\"2025-02-21T05:38:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=100889\"},\"wordCount\":647,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=100889#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg\",\"keywords\":[\"Data\",\"ECommerce\",\"enhanced\",\"Facebook\",\"GTMTips\",\"Layer\",\"Pixel\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=100889#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=100889\",\"url\":\"https:\/\/fivemor.com\/?p=100889\",\"name\":\"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=100889#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=100889#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg\",\"datePublished\":\"2025-02-21T05:38:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=100889#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=100889\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=100889#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=100889#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel - 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=100889","og_locale":"en_US","og_type":"article","og_title":"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel - Som2ny Network","og_description":"A recurring question in the Google Tag Manager communities (e.g. product forums) is how to use an Enhanced Ecommerce dataLayer object with the Facebook pixel code? It\u2019s a common question since running a Facebook conversion pixel on a site that also collects data from the store into Google Analytics\u2019 Enhanced Ecommerce reports is probably a [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=100889","og_site_name":"Som2ny Network","article_published_time":"2025-02-21T05:38:58+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=100889#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=100889"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel","datePublished":"2025-02-21T05:38:58+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=100889"},"wordCount":647,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=100889#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg","keywords":["Data","ECommerce","enhanced","Facebook","GTMTips","Layer","Pixel"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=100889#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=100889","url":"https:\/\/fivemor.com\/?p=100889","name":"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=100889#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=100889#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg","datePublished":"2025-02-21T05:38:58+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=100889#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=100889"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=100889#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/enhanced-ecommerce-facebook-pixel.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=100889#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"#GTMTips: Use Enhanced Ecommerce Data Layer With Facebook Pixel"}]},{"@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\/100889","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=100889"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/100889\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/100891"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=100889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=100889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=100889"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=100889"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=100889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}