window.dataLayer = window.dataLayer || []; window.getAmGa4Cookie = function () { let cookies = {}; document.cookie.split(';').forEach(function (el) { let [key, value] = el.split('='); cookies[key.trim()] = value; }); return cookies['amga4_customer'] ? decodeURIComponent(cookies['amga4_customer']) : '{}'; }; (function () { /** * @var {[Object]} */ const userProperties = JSON.parse(window.getAmGa4Cookie()); if (userProperties.customerGroup) { window.dataLayer.push({'customerGroup': userProperties.customerGroup}); } if (userProperties.customerId) { window.dataLayer.push({'customerId': userProperties.customerId}); } /** * @var {[Object]} */ const dataToPush = JSON.parse('