Become a HubSpot power user — join us for HubSpot Training Day 2017.


How do I install the HubSpot tracking code on my website?

Last updated: May 15, 2017

Available For:

Marketing: Free, Starter, Basic, Pro, Enterprise
Sales: Free, Professional
If your website is hosted on one of the listed systems below, click on your platform for more detailed instructions about installing the HubSpot tracking code:


For general instructions on installing the HubSpot tracking code on any platform: 

  • Copy your tracking code from your HubSpot portal by following the instructions here.
  • Once you have copied your tracking code from your portal, add the HubSpot tracking code directly before the </body> tag in the HTML of your website pages. Depending upon your website platform, you may be able to add the code globally to install it on all of your website pages or you may have to add it to the HTML of each of your pages. Contact your webmaster for additional setup assistance.

Please note: any pages built on HubSpot already have tracking code installed; you do not need to add the tracking code to these pages.

Was this article helpful?