Hi There,
Please remove the following code from your custom JS:
// Add Facebook custom audience pixel Code
// =============================================================================
function add_facebook_audience_pixel_code(){
?>
<!– Insert Facebook custom audience pixel Code starts here –>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '446311092407143'); // Insert your pixel ID here.
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=446311092407143&ev=PageView&noscript=1"
/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '446311092407143', {
em: 'insert_email_variable'
});
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=446311092407143&ev=PageView&noscript=1"
/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->
That is a php code and will cause JS error on the site. It is meant to be added on your child theme. Also when you add the code on your child theme functions.php it might fail because it has syntax error too. Format should be like this:
// Add Facebook custom audience pixel Code
// =============================================================================
function add_facebook_audience_pixel_code(){
?>
<!– Insert Facebook custom pixel Code starts here –>
<?php // This part is missing from you code. Make sure to copy complete code.
}
add_action( 'wp_head', 'add_facebook_audience_pixel_code' );
// End Facebook custom audience pixel Code
// =============================================================================
Hope this helps.