Index: /mods/wpsg_mod_statistics.class.php
===================================================================
--- /mods/wpsg_mod_statistics.class.php	(revision 8310)
+++ /mods/wpsg_mod_statistics.class.php	(revision 8311)
@@ -418,69 +418,73 @@
 				echo '<script type="text/javascript">';
 
-					// OLD - Wurde, bevor "Warenkorbtracking" integriert wurde, benÃ¶tigt fÃŒr "eCommerce Tracking"
-					// foreach ($done_view['basket']['produkte'] as $k => $p) 
-					// {
-
-					// 	$oProduct = wpsg_product::getInstance($p['id']);
-
-					// 	if ($this->shop->hasMod('wpsg_mod_produktartikel')) 
-					// 	{
-
-					// 		$categoryID = $oProduct->getPostID();
-					// 		$terms = get_the_terms($categoryID, get_taxonomies());
-
-					// 		if ($terms) 
-					// 		{
-
-					// 			$termNames = array(); 
-
-					// 			foreach ($terms as $term) $termNames[] = $term->name;
-
-					// 			$termNames = array_slice($termNames, 0, 5); // Matomo API Limitierung - max. 5 Kategorien
-
-					// 			$arCategoryName = json_encode($termNames);
-
-					// 		}
-
-					// 		if(!empty($arCategoryName)) 
-					// 		{
-
-					// 			echo '_paq.push(["addEcommerceItem", 
-					// 				"'.wpsg_hspc($p['id']).'", 
-					// 				"'.wpsg_hspc($p['name']).'", 
-					// 				'.$arCategoryName.', 
-					// 				'.wpsg_tf($p['preis']).', 
-					// 				'.wpsg_hspc($p['menge']).'
-					// 			]);';
-
-					// 		} 
-					// 		else 
-					// 		{
-								
-					// 			echo '_paq.push(["addEcommerceItem", 
-					// 				"'.wpsg_hspc($p['id']).'", 
-					// 				"'.wpsg_hspc($p['name']).'", 
-					// 				false, 
-					// 				'.wpsg_tf($p['preis']).', 
-					// 				'.wpsg_hspc($p['menge']).'
-					// 			]);';
-
-					// 		}
-
-					// 	} 
-					// 	else
-					// 	{
-
-					// 		echo '_paq.push(["addEcommerceItem", 
-					// 			"'.wpsg_hspc($p['id']).'", 
-					// 			"'.wpsg_hspc($p['name']).'", 
-					// 			false, 
-					// 			'.wpsg_tf($p['preis']).', 
-					// 			'.wpsg_hspc($p['menge']).'
-					// 		]);';
-
-					// 	}
-
-					// }
+					if ($this->shop->get_option('wpsg_mod_statistics_piwik_basketdata') == '0') 
+					{
+
+						foreach ($done_view['basket']['produkte'] as $k => $p) 
+						{
+
+							$oProduct = wpsg_product::getInstance($p['id']);
+
+							if ($this->shop->hasMod('wpsg_mod_produktartikel')) 
+							{
+
+								$categoryID = $oProduct->getPostID();
+								$terms = get_the_terms($categoryID, get_taxonomies());
+
+								if ($terms) 
+								{
+
+									$termNames = array(); 
+
+									foreach ($terms as $term) $termNames[] = $term->name;
+
+									$termNames = array_slice($termNames, 0, 5); // Matomo API Limitierung - max. 5 Kategorien
+
+									$arCategoryName = json_encode($termNames);
+
+								}
+
+								if(!empty($arCategoryName)) 
+								{
+
+									echo '_paq.push(["addEcommerceItem", 
+										"'.wpsg_hspc($p['id']).'", 
+										"'.wpsg_hspc($p['name']).'", 
+										'.$arCategoryName.', 
+										'.wpsg_tf($p['preis']).', 
+										'.wpsg_hspc($p['menge']).'
+									]);';
+
+								} 
+								else 
+								{
+									
+									echo '_paq.push(["addEcommerceItem", 
+										"'.wpsg_hspc($p['id']).'", 
+										"'.wpsg_hspc($p['name']).'", 
+										false, 
+										'.wpsg_tf($p['preis']).', 
+										'.wpsg_hspc($p['menge']).'
+									]);';
+
+								}
+
+							} 
+							else
+							{
+
+								echo '_paq.push(["addEcommerceItem", 
+									"'.wpsg_hspc($p['id']).'", 
+									"'.wpsg_hspc($p['name']).'", 
+									false, 
+									'.wpsg_tf($p['preis']).', 
+									'.wpsg_hspc($p['menge']).'
+								]);';
+
+							}
+
+						}
+
+					}
 
 					if ($this->shop->hasMod('wpsg_mod_discount'))
