["<script><!-- Facebook Pixel Code -->\n    \n                \n          !function(f, b, e, v, n, t, s) {\n          if (f.fbq) return;\n          n = f.fbq = function() {\n            n.callMethod ?\n              n.callMethod.apply(n, arguments) : n.queue.push(arguments);\n          };\n          if (!f._fbq) f._fbq = n;\n          n.push = n;\n          n.loaded = !0;\n          n.version = \"2.0\";\n          n.queue = [];\n          t = b.createElement(e);\n          t.async = !0;\n          t.src = v;\n          s = b.getElementsByTagName(e)[0];\n          s.parentNode.insertBefore(t, s);\n        }(window, document, \"script\",\n          \"https://connect.facebook.net/en_US/fbevents.js\");\n\n        fbq(\"init\", '318069052636709');\n\n        \n        if (event) {\n          fbq(\"track\", event, { currency: \"EUR\", value: value, content_name: product }, { eventID: eventID });\n        }\n    \n    <!-- End Facebook Pixel Code -->\n</script>",{"name":"fb","location":"head","consentType":"statistical","content":"<script><!-- Facebook Pixel Code -->\n    \n                \n          !function(f, b, e, v, n, t, s) {\n          if (f.fbq) return;\n          n = f.fbq = function() {\n            n.callMethod ?\n              n.callMethod.apply(n, arguments) : n.queue.push(arguments);\n          };\n          if (!f._fbq) f._fbq = n;\n          n.push = n;\n          n.loaded = !0;\n          n.version = \"2.0\";\n          n.queue = [];\n          t = b.createElement(e);\n          t.async = !0;\n          t.src = v;\n          s = b.getElementsByTagName(e)[0];\n          s.parentNode.insertBefore(t, s);\n        }(window, document, \"script\",\n          \"https://connect.facebook.net/en_US/fbevents.js\");\n\n        fbq(\"init\", '318069052636709');\n\n        \n        if (event) {\n          fbq(\"track\", event, { currency: \"EUR\", value: value, content_name: product }, { eventID: eventID });\n        }\n    \n    <!-- End Facebook Pixel Code -->\n</script>"}]