{"id":28202,"date":"2026-03-24T17:00:35","date_gmt":"2026-03-24T16:00:35","guid":{"rendered":"https:\/\/training.webanalyste.com\/?p=28202"},"modified":"2026-03-24T17:00:39","modified_gmt":"2026-03-24T16:00:39","slug":"tags-formation-matomo","status":"publish","type":"post","link":"https:\/\/training.webanalyste.com\/fr\/tags-formation-matomo\/","title":{"rendered":"Tags formation matomo"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Matomo &#8211; View item<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\nwindow._paq = window._paq || &#91;];\n\nvar ecommerce = {{Ecommerce}};\nvar item = ecommerce.items&#91;0];\nif (ecommerce && ecommerce.items) {\n_paq.push(&#91;'setEcommerceView', item.item_id, item.item_name, item.item_category, item.price]);\n}\n\n\/\/ _paq.push(&#91;'trackEvent', 'Ecommerce', 'View item', 'view_item', item.price]);\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Matomo &#8211; Update cart<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\nwindow._paq = window._paq || &#91;];\n\n_paq.push(&#91;'clearEcommerceCart']);  \/\/ Reset du panier virtuel\n\nvar cart = {{dlv cart}};    \/\/ objet avec toutes les propri\u00e9t\u00e9s \"update cart\"\nvar items =  cart.items; \/\/ DL array des items du panier mis \u00e0 jour\nvar value = cart.value || 0; \/\/ valeur total du panier ou 0\n\n\nitems.forEach( item => {  \/\/ cr\u00e9ation du nouveau panier virtuel \u2013 on ajoute chaque item\n  _paq.push(&#91;'addEcommerceItem',\n    item.item_id || '',\n    item.item_name || '',\n    item.item_category || '',\n    item.price || 0,\n    item.quantity || 1\n  ]);\n});\n\n\/\/ Push custom event\n_paq.push(&#91;'trackEvent', 'Ecommerce', 'Update cart', 'update_cart',value]);\n\n_paq.push(&#91;'trackEcommerceCartUpdate', value]);  \/\/ collecte les donn\u00e9es vers Matomo\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Matomo &#8211; Purchase<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\nwindow._paq = window._paq || &#91;];\nvar ecommerce = {{Ecommerce}};\n\n\/\/ Product Array\necommerce.items.forEach(function(item){\n    _paq.push(&#91;'addEcommerceItem',\n        item.item_id,\n        item.item_name,\n        item.item_category,\n        item.price,\n        (item.quantity || 1)\n    ]);\n});\n\n\/\/ Push custom event\n_paq.push(&#91;'trackEvent', 'Ecommerce', 'Purchase', 'purchase', ecommerce.value]);\n\n\/\/ Push ecommerce data\nwindow._paq.push(&#91;'trackEcommerceOrder',\n    ecommerce.transaction_id,\n    ecommerce.value,\n    (ecommerce.order_sub_total || 0),\n    (ecommerce.tax || 0),\n    (ecommerce.shipping || 0),\n    (ecommerce.discount || false)\n]);\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Facebook &#8211; ViewContent<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>fbq(\n  'track', 'ViewContent', { \n    content_type: 'product',\n    content_ids: &#91;'1234'],\n    content_name: 'ABC Leather Sandal',\n    content_category: 'Shoes'\n    value: 0.50,\n    currency: 'USD'\n  }\n);\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Facebook &#8211; AddToCart<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>fbq('track', 'AddToCart', {\n\ncontent_name: leather sandals,\ncontent_ids: &#91;'1234'],\ncontent_type: 'product',    \nvalue: 50.00,\ncurrency: 'USD'\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Facebook &#8211; Purchase<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>fbq(\n  'track', 'Purchase', { \n    content_type: 'product',\n    contents: &#91;\n      { 'id': '1234', 'quantity': 2, },\n      { 'id': '4642', 'quantity': 1, }\n    ],\n    value: 25.00,\n    currency: 'USD'\n  }\n);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Matomo &#8211; View item Matomo &#8211; Update cart Matomo &#8211; Purchase Facebook &#8211; ViewContent Facebook &#8211; AddToCart Facebook &#8211; Purchase<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[216],"tags":[],"class_list":["post-28202","post","type-post","status-publish","format-standard","hentry","category-blog-tags"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tags formation matomo<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:locale:alternate\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tags formation matomo\" \/>\n<meta property=\"og:description\" content=\"Matomo &#8211; View item Matomo &#8211; Update cart Matomo &#8211; Purchase Facebook &#8211; ViewContent Facebook &#8211; AddToCart Facebook &#8211; Purchase\" \/>\n<meta property=\"og:url\" content=\"https:\/\/training.webanalyste.com\/fr\/tags-formation-matomo\/\" \/>\n<meta property=\"og:site_name\" content=\"webAnalyste&#039;s training\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-24T16:00:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-24T16:00:39+00:00\" \/>\n<meta name=\"author\" content=\"fscan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"fscan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/\"},\"author\":{\"name\":\"fscan\",\"@id\":\"https:\/\/training.webanalyste.com\/#\/schema\/person\/813086fa3886eade55c97c202e0ac711\"},\"headline\":\"Tags formation matomo\",\"datePublished\":\"2026-03-24T16:00:35+00:00\",\"dateModified\":\"2026-03-24T16:00:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/\"},\"wordCount\":25,\"commentCount\":0,\"articleSection\":[\"tags\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/\",\"url\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/\",\"name\":\"Tags formation matomo\",\"isPartOf\":{\"@id\":\"https:\/\/training.webanalyste.com\/#website\"},\"datePublished\":\"2026-03-24T16:00:35+00:00\",\"dateModified\":\"2026-03-24T16:00:39+00:00\",\"author\":{\"@id\":\"https:\/\/training.webanalyste.com\/#\/schema\/person\/813086fa3886eade55c97c202e0ac711\"},\"breadcrumb\":{\"@id\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/training.webanalyste.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tags formation matomo\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/training.webanalyste.com\/#website\",\"url\":\"https:\/\/training.webanalyste.com\/\",\"name\":\"webAnalyste&#039;s training\",\"description\":\"Analytics playground\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/training.webanalyste.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/training.webanalyste.com\/#\/schema\/person\/813086fa3886eade55c97c202e0ac711\",\"name\":\"fscan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/a0b99fd13518b76efbe61f5b0f535be37d5e66be7a1a2679ed501e3ab1da3011?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0b99fd13518b76efbe61f5b0f535be37d5e66be7a1a2679ed501e3ab1da3011?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0b99fd13518b76efbe61f5b0f535be37d5e66be7a1a2679ed501e3ab1da3011?s=96&d=mm&r=g\",\"caption\":\"fscan\"},\"url\":\"https:\/\/training.webanalyste.com\/fr\/author\/fscan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tags formation matomo","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"fr_FR","og_type":"article","og_title":"[:en]Tags formation matomo[:] - webAnalyste&#039;s training","og_description":"Matomo &#8211; View item Matomo &#8211; Update cart Matomo &#8211; Purchase Facebook &#8211; ViewContent Facebook &#8211; AddToCart Facebook &#8211; Purchase","og_url":"https:\/\/training.webanalyste.com\/fr\/tags-formation-matomo\/","og_site_name":"webAnalyste&#039;s training","article_published_time":"2026-03-24T16:00:35+00:00","article_modified_time":"2026-03-24T16:00:39+00:00","author":"fscan","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"fscan","Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#article","isPartOf":{"@id":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/"},"author":{"name":"fscan","@id":"https:\/\/training.webanalyste.com\/#\/schema\/person\/813086fa3886eade55c97c202e0ac711"},"headline":"Tags formation matomo","datePublished":"2026-03-24T16:00:35+00:00","dateModified":"2026-03-24T16:00:39+00:00","mainEntityOfPage":{"@id":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/"},"wordCount":25,"commentCount":0,"articleSection":["tags"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/training.webanalyste.com\/tags-formation-matomo\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/","url":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/","name":"Tags formation matomo","isPartOf":{"@id":"https:\/\/training.webanalyste.com\/#website"},"datePublished":"2026-03-24T16:00:35+00:00","dateModified":"2026-03-24T16:00:39+00:00","author":{"@id":"https:\/\/training.webanalyste.com\/#\/schema\/person\/813086fa3886eade55c97c202e0ac711"},"breadcrumb":{"@id":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/training.webanalyste.com\/tags-formation-matomo\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/training.webanalyste.com\/tags-formation-matomo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/training.webanalyste.com\/"},{"@type":"ListItem","position":2,"name":"Tags formation matomo"}]},{"@type":"WebSite","@id":"https:\/\/training.webanalyste.com\/#website","url":"https:\/\/training.webanalyste.com\/","name":"webAnalyste&#039;s training","description":"Analytics playground","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/training.webanalyste.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/training.webanalyste.com\/#\/schema\/person\/813086fa3886eade55c97c202e0ac711","name":"fscan","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/secure.gravatar.com\/avatar\/a0b99fd13518b76efbe61f5b0f535be37d5e66be7a1a2679ed501e3ab1da3011?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a0b99fd13518b76efbe61f5b0f535be37d5e66be7a1a2679ed501e3ab1da3011?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0b99fd13518b76efbe61f5b0f535be37d5e66be7a1a2679ed501e3ab1da3011?s=96&d=mm&r=g","caption":"fscan"},"url":"https:\/\/training.webanalyste.com\/fr\/author\/fscan\/"}]}},"_links":{"self":[{"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/posts\/28202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/comments?post=28202"}],"version-history":[{"count":1,"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/posts\/28202\/revisions"}],"predecessor-version":[{"id":28203,"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/posts\/28202\/revisions\/28203"}],"wp:attachment":[{"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/media?parent=28202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/categories?post=28202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/training.webanalyste.com\/fr\/wp-json\/wp\/v2\/tags?post=28202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}