Excluding a URL from Hubspot tracking on a WP site


I am looking to exlcude a specific page on a WP site from the Hubspot tracking figures, Anyone know how this is done?

I am aware of the domain exclusion and IP filtering but I want to exclude a log in page for SaaS company - its generating lots of traffic as customers login and affecting the conversion rates.

Chatting with support they have the suggested a ‘no track’ link for the home page button but I woukld like to exclude the login page from the Hubspot figures.

Hubspot tracking code currently in the footer of the pages.


Hi @IndigoSteve

We don’t have any options to exclude a specific page from tracking, either in the tracking code itself or general analytics options in HubSpot.

It would be possible to prevent tracking on a page by omitting the tracking code on that page, but you would lose all tracking for that page, which would include losing the visitor’s original source if that happens to be the first page they hit on your website.


One clever way to do this if you just need to exclude specific pages is to use the is_page conditional in WordPress. This way you are preventing the tracker on the page or array of pages you feed in to the is_page function and allowing the tracker to show up for all other pages.

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

<?php } else { ?>


<?php } ?>


I have added the tracking code in google tag Manager. In this case, how do i exclude a specific page from tracking ?