CMS Development

Chapster5
Member

Excluding A page from tracking

SOLVE

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-sit...

 

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

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Excluding A page from tracking

SOLVE

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

You can probably piece it together from this doc

View solution in original post

0 Upvotes
4 Replies 4
dennisedson
HubSpot Product Team
HubSpot Product Team

Excluding A page from tracking

SOLVE

@Chapster5 

How do you have tracking setup now?

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

0 Upvotes
Chapster5
Member

Excluding A page from tracking

SOLVE

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 ☺️

 

Nick

0 Upvotes
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Excluding A page from tracking

SOLVE

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

You can probably piece it together from this doc

0 Upvotes
Chapster5
Member

Excluding A page from tracking

SOLVE

That may be just what I need my friend!

 

Thank you ❤️