How to add HubSpot and Google Analytics codes to your website

Ensuring your website has analytics is key to creating marketing campaigns that work. Here are the steps to add analytics codes to your website.

HubSpot code:

  1. Go to settings > reports > tracking code
    Adding HubSpot code 1
  2. Copy the tracking code and add it into every page of your site, just before the </body> tag.
    Adding HubSpot code 2
  3. If you have a Wordpress website you can download the HubSpot plugin and you would just need to add your HubSpot ID in, which can be found at the end of the tracking code.
    Adding HubSpot code 3

Google Analytics code:

This support article from Google and this article from HubSpot give you a detailed breakdown on how to add the code. The key steps are: 

  1. Sign in/ or create your Analytics account here: http://www.google.com/analytics/ 
  2. Then go to Admin > Tracking Info > tracking code
    Google analytics code added 1
  3. Copy and paste this code as the first item into the <HEAD> of every webpage you want to track.
    Google analytics code added 2
  4. If you have a Wordpress site you will need to install a plugin, either the Header and Footer one (which is recommended as you would be able to add more codes using this plugin) or using a Google Analytics plugin. 

If you need further assistance adding codes to your website, contact us