rackSingle', '182165462386436', 'Search', { content_type: 'product_group', content_ids: [], search_string: getUrlParameter('search_query') }); } // Search events end // Wishlist events start -- only fire if the shopper attempts to add an item to their wishlist if (pathName.indexOf('/wishlist.php') === 0 && getUrlParameter('added_product_id')) { fbq('trackSingle', '182165462386436', 'AddToWishlist', { content_type: 'product_group', content_ids: [] }); } // Wishlist events end // Lead events start -- only fire if the shopper subscribes to newsletter if (pathName.indexOf('/subscribe.php') === 0 && getUrlParameter('result') === 'success') { fbq('trackSingle', '182165462386436', 'Lead', {}); } // Lead events end // Registration events start -- only fire if the shopper registers an account if (pathName.indexOf('/login.php') === 0 && getUrlParameter('action') === 'account_created') { fbq('trackSingle', '182165462386436', 'CompleteRegistration', {}, ""); } // Registration events end function getUrlParameter(name) { var cleanName = name.replace(/[\[]/, '\[').replace(/[\]]/, '\]'); var regex = new RegExp('[\?&]' + cleanName + '=([^]*)'); var results = regex.exec(window.location.search); return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); } } if (window.addEventListener) { window.addEventListener("load", trackEvents, false) }
Skip to main contentCalifornia Prop65 WARNING: Cancer and Reproductive Harm - www.P65Warnings.ca.gov