var Tracking={trackSelector:".trackEvent",initialize:function(){this.trackEventListener(),this.trackNewsletterRegistration(),this.trackAmazonLink(),this.trackAdventCalendarLink()},getData:function(t){var a=[];return a.category=t.data("trackcategory"),a.action=t.data("trackaction"),a.label=t.data("tracklabel")?t.data("tracklabel"):t.attr("href"),a.value=t.data("trackvalue"),a},trackEventListener:function(){var t=this;jQuery("body").on("click",t.trackSelector,function(){t.push(this)})},trackNewsletterRegistration:function(){var t=this;jQuery(".newsletter-registration-success").length&&t.push(this)},trackAmazonLink:function(){jQuery('a[href^="https://www.amazon.de"]').length&&jQuery('a[href^="https://www.amazon.de"]').click(function(){try{dataLayer.push({event:"tg_E-Commerce",eventAction:"Amazon Clickout",eventLabel:jQuery(this).attr("href")})}catch(t){}})},trackAdventCalendarLink:function(){var t=this,a=".popupbox-advent .doorcontent .button",e=jQuery(a);e.length&&(e.each(function(){var t=jQuery(this).closest(".popupbox-advent").attr("aria-label");jQuery(this).attr({"data-trackcategory":"tg_Advent-Calendar","data-trackaction":"Door Button Click","data-tracklabel":t,"data-trackvalue":jQuery(this).text().trim()})}),jQuery("body").on("click",a,function(){t.push(this)}))},push:function(t){var a=this,e=jQuery(t),r=a.getData(e);try{dataLayer.push({event:r.category,eventAction:r.action,eventLabel:r.label,eventValue:r.value})}catch(t){}}};jQuery(document).ready(function(){Tracking.initialize()});