With the monitoring code, the HubSpot system can record the traffic on your website. This allows you to track user activity on your website.
1. Copy HubSpot tracking code
- In your HubSpot account, click on the gear icon in the main navigation bar to access the settings.
- Navigate to the item "Tracking & Analytics":
- For accounts that only have access to Marketing Starter or HubSpot's free tools, navigate to Tracking Code in the left sidebar.
- For all other subscriptions, go to "Tracking & Analytics" > "Tracking Code" in the left sidebar menu.
- Click on "Copy" in the "Tracking code" section or click on "Email to my web developer" to send the tracking code to the team member responsible for installing the code on your website.
2. Install tracking code on your Website
- To install the tracking code, insert the code before the final </body> tag in the HTML code on each page of your website. Once you have installed the tracking code, learn how to check the installation and fix code errors here.
- At the same time, most content management systems and your developers can install code for all pages of your website, e.g. a footer file that is referenced on all pages. Contact your developers if you need further support for this.
3. Install tracking code on a WordPress website
- It is recommended to install and use the plugin "HubSpot All-In-One Marketing - Forms, Popups, Live Chat" for WordPress. The plugin automatically installs the HubSpot tracking code on your WordPress website for you.
- If you cannot install the HubSpot WordPress plugin, you can install the HubSpot tracking code manually:
- Follow the steps above to copy the HubSpot tracking code into your WordPress account.
- Log in to your WordPress account.
- Go to "Appearance" > "Editor" in the left sidebar.
- Select your footer from the list of design files on the right-hand side of the editor.
- Insert the tracking code and select "Update file"
The following page lists instructions for specific content management systems, such as Shopify, Drupal, Magento, Joomla, etc: