Test your HubSpot tracking code

Last updated: July 30, 2018

There are a few ways to verify that your tracking code is working:

I don't see any page views; is my tracking code installed correctly?

  1. Verify your HubSpot ID (Hub ID). Your Hub ID is located in the top right corner of your HubSpot account.
  2.  Open a page on your website in your browser and right-click on the screen.
  3.  Select View page source or View source.
  4. The next screen will show all of the code that makes up your website. To find out if the HubSpot tracking code is installed, use the keyboard shortcut Ctrl + F or Cmd + F to bring up the search field. Search for [your Hub ID].js (for example, 401264.js).

    Please note: you may see the HubSpot Embed Code or Async HubSpot Analytics Code here; these are both HubSpot tracking codes and indicate that your tracking code has been installed. 

    If you are using Google Tag Manager or another script loader, the tracking code will not appear in the page source. Follow the steps below to check the Network tab and ensure that the code is firing correctly.

View Page Source
  • If the tracking code is not found on your website, learn more about how to install HubSpot's tracking code.
  • If the tracking code is installed on your website, verify that the code has been copied and pasted correctly from your Reports & Analytics Tracking settings in your account settings. 

I see the tracking code installed correctly on my website; how do I know if it is firing correctly?

  • Open a page on your website in your browser and right-click on the screen.
  • Select Inspect Element (or Inspect). You will see a toolbar appear at the bottom of your screen.
  • Click the Network tab, then refresh your page. On the Network tab, you will now see the Name, Method, Status, Type, etc. for all of the elements loading on your webpage.
  • Click the Name column to sort alphabetically, then scroll to the top of the list.
  • Look for [your Hub ID].js in the Name column; for example: 401264.js. Under the name for the element, you may see from and/or an instance of this .js element from here.  

  • Next to [your Hub ID].js, you should see 304 Not Modified or 200 OK in the Status column.

If you see any other status or the .js code is not found, your tracking code may not be firing correctly. Please contact HubSpot Support for further troubleshooting.

Please note: it is expected to see both hubid.js from and hubid.js from firing in the network tab. If the script loader ( is present, it is expected to also see the actual tracking script ( 

If you just see the actual tracking script ( and not the script loader, that is normal.

If you use the messages tool, you might also see a third script entitled hubid.js from, which is also normal.

Another way to determine whether or not your tracking code is firing correctly is to look at your website traffic in the traffic analytics report:

  • Navigate to Reports > Analytics Tools.
  • Select Traffic Analytics
  • Click on the Pages tab. 
  • Select the checkbox directly next to the domain you are testing.  

  • Select Today for the date range, and check to see if there is any traffic. If there is, that means that your tracking code is firing. If you are not seeing any website traffic, it is likely that either the tracking code is not installed correctly or the pages have not had tracked views in the time range selected.

I don't see any page views today (but I did yesterday); is my tracking code working?

If it has been more than 20 minutes since your test session on your tracked website and you are not seeing expected page views in the pages report, check out to see if there is a known issue with HubSpot displaying analytics data.

Was this article helpful?

If you still need help you can get answers from the , or to contact support.