Hubspot WordPress Plug in – ignore a certain page – is_page

  hubspot, javascript, php, wordpress

So essentially I have Hubspot plug in on WordPress all is well however Hubspot tracks all pages on the site regardless. I dont want Hubspot to track a shop page lets say it’s slug is spares-and-repairs I have tried putting this simple bit of code into the footer of the theme and trst running it but it’s still inserting the Hubspot tracking Java into the footer of the spares-and-repairs page.

Any help would be appreciated!

Thank you

<?php if (is_page('spares-and-repairs')) { ?>
<?php } else { ?>

<!-- Start of HubSpot Embed Code -->

<!-- End of HubSpot Embed Code -->

<?php } ?>

Source: Ask PHP