I seem to be having some issues with tracking code / tags on my site. I’m trying to put the below tag only on specific pages:
<script type="text/javascript"><!--
vs_account_id = "fwABAVxl1bV0xQCd";
//--></script>
<script type="text/javascript" src="https://rw1.marchex.io/euinc/number-changer.js">
</script>
<!-- end ad widget -->
the page ids I need it on are: 216,906,179,169,899,905,147,169,2
I tried this code below but it doesn’t work as it seems to be conflicting with other tracking code / tags in my functions.php file:
function third_party_tracking_code_header() {
if ( is_page(216,906,179,169,899,905,147,169,2) ) : ?>
<!-- start number replacer -->
<script type="text/javascript"><!--
vs_account_id = "fwABAVxl1bV0xQCd";
//--></script>
<script type="text/javascript" src="https://rw1.marchex.io/euinc/number-changer.js">
</script>
<!-- end ad widget -->
<?php }
add_action( 'wp_head', 'third_party_tracking_code_header' );