APIs & Integrations

IndigoSteve
Member

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.

0 Upvotes
5 Replies 5
DanKemp
Participant

Excluding a URL from Hubspot tracking on a WP site

I just set this up using Google Tag Manager, in the same scenario where logins from the homepage were bloating numbers. You can set which pages the Hubspot tag will trigger on. So now all my tracking - Hubspot, Linkedin, Facebook Pixel etc. all only fire on specific "sales" pages.

 

Screenshot 2021-10-27 at 12.33.45.png

Deepak
Participant

Excluding a URL from Hubspot tracking on a WP site

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

0 Upvotes
mike-viele
Member

Excluding a URL from Hubspot tracking on a WP site

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 { ?>

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

<?php } ?>
0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Excluding a URL from Hubspot tracking on a WP site

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.

0 Upvotes
InvesTechs
Participant | Gold Partner
Participant | Gold Partner

Excluding a URL from Hubspot tracking on a WP site

And how to do this? Is it an option in HubSpot Portal to ommit the tracking code on specific pages? Is it an option in the HubSpot WordPress plugin to do so? Or do I need to write some javascript?

Seems this should be pretty straightforward and perhaps a stock feature of the tracking code.

0 Upvotes