App Tutorial

Install HubSpot Tracking Code on Any Website: A Step-by-Step Guide

author
Jason Gong
App automation expert
Apps used
HubSpot
LAST UPDATED
April 15, 2024
TL;DR

Adding the HubSpot tracking code to your website involves accessing your HubSpot account, navigating to 'Tracking & Analytics' settings, and copying the embed code to your website's footer or through Google Tag Manager. This process is crucial for monitoring website traffic and gathering analytics across platforms like WordPress, Shopify, and more.

Understanding how to properly install this code can significantly enhance your site's data collection and analytics capabilities.

Enhance your HubSpot workflows and ensure your data is always up-to-date by automating tasks with Bardeen.

How to Add HubSpot Tracking Code to Website

Adding the HubSpot tracking code to your website is essential for monitoring website traffic and gathering analytics. This guide will walk you through the process, covering various platforms including WordPress, Shopify, Drupal, Magento, Wix, Joomla, Squarespace, and the integration with Google Tag Manager.

While adding the HubSpot tracking code is crucial, automating your HubSpot workflows with Bardeen can further enhance efficiency and data management.

Install HubSpot Tracking Code

To install the HubSpot tracking code, first, access your HubSpot account and navigate to the settings icon in the main navigation bar. Depending on your subscription, locate the 'Tracking & Analytics' settings or 'Tracking Code' for accounts with only access to Marketing Starter or HubSpot’s free tools. In the 'Embed code' section, click 'Copy' or opt to email the code to your web developer.

'var _hsq = window._hsq = window._hsq || []; _hsq.push(['setContentType', 'CONTENT_TYPE']);'

Replace 'CONTENT_TYPE' with the specific content type to bucket data into HubSpot page types for external pages. This additional code helps in attributing credits to various content types like website pages, landing pages, listing pages, blog posts, and knowledge articles.

Add HubSpot Tracking Code to WordPress

For WordPress users, it is recommended to install the HubSpot All-in-One Marketing - Forms, Pop-ups, Live Chat WordPress plugin. This plugin automatically installs the HubSpot tracking code on your WordPress site. If you cannot install the plugin, manually insert the tracking code by navigating to Appearance > Editor in your WordPress dashboard and pasting the code in your theme's Footer.

HubSpot Tracking Code Google Tag Manager

To integrate HubSpot with Google Tag Manager, copy the HubSpot tracking code and log into your Google Tag Manager account. Create a new tag with the tag type set to Custom HTML Tag and paste the HubSpot tracking code. Set up a triggering rule for the tag to fire on all pages where the Google Tag Manager code is installed. Remember to publish your container and tags after setting up.

Additionally, you can integrate Google Tag Manager directly with HubSpot-hosted content by selecting the 'Integrate with Google Tag Manager' checkbox in the 'Integrations' tab under 'Website' > 'Pages' in your HubSpot settings. Enter your Google Tag Manager ID to complete the integration.

Following these steps will enable you to successfully add the HubSpot tracking code to your website, allowing you to monitor traffic and gather valuable analytics across various platforms.

Enhance your data management with Bardeen: Create HubSpot ticket, add a new row to a Coda table when a HubSpot contact is created, and sync LinkedIn social activity to HubSpot contact. Download Bardeen now.

Explore how to integrate HubSpot with Salesforce, integrate HubSpot with LinkedIn to enrich and speed up multi-channel outreach, and sync HubSpot and Slack for instant alerts.

Automate Your HubSpot Workflows with Bardeen

While adding the HubSpot tracking code to your website is a manual process crucial for gathering insightful analytics, automating your HubSpot workflows can further enhance your website's efficiency and data management capabilities. Utilizing Bardeen, you can automate various tasks related to HubSpot, saving time and ensuring your data is always up-to-date.

  1. Create HubSpot ticket: Automate the creation of HubSpot tickets directly from your website, ensuring customer issues are promptly addressed and tracked for an improved support experience.
  2. Add a new row to a Coda table, when HubSpot contact is created: Sync new HubSpot contacts to a Coda table automatically, keeping your CRM and project management tools aligned and up-to-date.
  3. Sync LinkedIn Social Activity to HubSpot Contact: Enrich your HubSpot CRM by automatically updating contact properties with their LinkedIn social activities, providing deeper insights for personalized engagement strategies.

By leveraging these automations, you can significantly enhance your HubSpot management and ensure your data works for you. Start simplifying your workflows today by downloading the Bardeen app.

Other answers for HubSpot

Sales Demo: 15 Tips to Boost Closing Rates

Learn what a sales demo is and discover 15 top tips to increase your closing rates effectively in 2024.

Read more
Top 70+ Sales Discovery Questions for 2024

Explore over 70 sales discovery questions to better understand prospects and qualify leads effectively. Boost your sales strategy now!

Read more
Understanding Sales Discovery Calls: A Guide

Learn what a sales discovery call is, its importance, and how it helps identify and understand prospect needs effectively.

Read more
Understanding Cold Outreach: Key Methods & Tips

Learn what cold outreach is, its importance in sales, and explore effective strategies to connect with potential customers.

Read more
Understanding Sales Intelligence: Tools & Trends

Learn what sales intelligence is, its core components, and how it can transform your sales strategy and competitive edge.

Read more
Effective Cold Email Writing Tips & Techniques 2024

Learn how to craft compelling cold emails with clear CTAs, personalization, and strategic follow-ups to boost open rates and replies.

Read more
how does bardeen work?

Your proactive teammate — doing the busywork to save you time

Integrate your apps and websites

Use data and events in one app to automate another. Bardeen supports an increasing library of powerful integrations.

Perform tasks & actions

Bardeen completes tasks in apps and websites you use for work, so you don't have to - filling forms, sending messages, or even crafting detailed reports.

Combine it all to create workflows

Workflows are a series of actions triggered by you or a change in a connected app. They automate repetitive tasks you normally perform manually - saving you time.

get bardeen

Don't just connect your apps, automate them.

200,000+ users and counting use Bardeen to eliminate repetitive tasks

Effortless setup
AI powered workflows
Free to use
Reading time
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
By clicking “Accept”, you agree to the storing of cookies. View our Privacy Policy for more information.