Excluding A page from tracking

Hi all,

So with Hubspot is there a way exclude just one page from the tracking system on Wordpress? Say the page slug is Shop anyone who goes through the site to shop just needs to be ignored.

I’ve read this thread

https://community.hubspot.com/t5/APIs-Integrations/Excluding-a-URL-from-Hubspot-tracking-on-a-WP-site/m-p/228049#M6945

And this code is apparently how you do it…

<?php if (is_page('PAGE SLUG GOES HERE')) { ?>

<?php } else { ?>

<!-- ADD HUBSPOT TRACKING CODE HERE -->

<?php } ?>

But where in WordPress would I add this? Or what file would I edit?

Thank you all!

Nick

@Chapster5

How do you have tracking setup now?

@Anton , you still fiddle around with wordpress dev, right? Can you lend a hand here?

Thank you for the reply @dennisedson

So right now I’m nnot sure as I am trying to help my girlfriend out at her job with their hubspot as its causing a lot of traffic but if a customer goes to a shop page (in this case spare parts for something) they’ve already got the machines in question so dont need sales. So just need that page to be excluded.

I do however have a little test site setup as a demo to play with the test ideas just looking where to insert the code :smiling_face:

Nick

Before @Anton saves the day, I would suggest checking out the footer.php file :slightly_smiling_face:

You can probably piece it together from this doc

That may be just what I need my friend!

Thank you :heart: