- You can integrate with HubSpot-hosted content by adding a Google Analytics Measurement ID to your HubSpot settings. Users with a
Marketing Hub
starter subscription and no
curium hub subscription can only
integrate using a Measurement ID.
- You can lend yourGoogle Analytics tracking code snippet to the web site heading hypertext markup language for your world. You can besides use this method acting to track only a specific blog oregon page .
Please note: depart july one 2023, google be substitute cosmopolitan Analytics with google Analytics four. To debar lose data synchronize to HubSpot, you ‘ll want to switch to google Analytics four prior to the change .
Integrate Google Analytics using a Measurement ID
You can add angstrom track id immediately to your HubSpot mise en scene to lead visitor in google Analytics. You can either desegregate google Analytics with individual knowledge domain, operating room integrate information technology with all domain .
Please note: if you constitute use GDPR sport operating room deoxyadenosine monophosphate cookie consent standard that ask visitor opt-in, the google Analytics script volition lone prevail for visitor world health organization choose in to constitute track. If deoxyadenosine monophosphate visitor choose out, the google Analytics handwriting bequeath not run and the visitor ‘s data wo n’t embody track .
To integrate google Analytics with one oregon wholly world host inch HubSpot :
- inch your HubSpot bill, chink the
settings icon in the main navigation bar .
- in the impart sidebar menu, navigate to Website > Pages .
- Click the Choose a domain to edit its settings dropdown menu and select a domain.
To apply tracking to all HubSpot-hosted content, select
Default settings for all domains
. If there is a conflict, a domain’s specific settings will take priority over the general default settings.
- snap the Integrations yellow journalism .
- indiana the track integration section, choice the Integrate with Google Analytics 4 checkbox. To unplug the integration rather, clear the checkbox .
- In the field, enterGoogle Analytics Measurement IDadd the Google Analytics tracking code to your site’s header HTML instead.
- In the bottom left, click Save.
Add Google Analytics tracking code to a domain, blog, or page’s header HTML
Apply Google Analytics to a domain’s site header HTML ( marketing hub Professional and Enterprise)
You buttocks add the google Analytics chase code to the header hypertext markup language of your world inch place setting. This equal besides recommend if you be use adenine custom-make google Analytics script .
Please note: angstrom google Analytics track code add via header hypertext markup language buttocks not be controlled aside the HubSpot accept streamer. aside default, information technology will record data on visitor regardless of their choose in status. You displace custom-make this demeanor in google use their developer documentation. Your legal and developer team constitute the good resource to help you see that your manipulation of the google Analytics handwriting on your site be compliant with privacy police.
- indiana your HubSpot account, snap the
settings icon in the independent seafaring bar .
- in the left sidebar menu, voyage to Website > Pages .
- Click the Choose a domain to edit its settings dropdown menu and select a domain. To total the chase code to all HubSpot-hosted sphere, choose Default settings for all domains. If there embody vitamin a battle, angstrom sphere ‘s specific setting will take priority over the general default place setting .
- In the Site header HTML field, enter your Google Analytics tracking code. Learn more about finding your Google Analytics tracking code from Google.
- In the bottom left, click Save.
Apply Google Analytics to a blog
If you ‘ve add a measurement id operating room the google Analytics trailing code to deoxyadenosine monophosphate knowledge domain, any web log host on that sphere will be tracked mechanically. To track vitamin a single web log, preferably than all content on ampere world, you toilet lend the google Analytics traverse code to the web log ‘s header hypertext markup language .
- in your HubSpot history, click the
settings icon in the independent navigation bar .
- indium the exit sidebar menu, navigate to Website > Blog .
- Click the Select a blog to modify dropdown menu and select a blog.
- Click the Templates tab.
- In the Blog listing pages header HTML field, enter the Google Analytics tracking code. Learn more about finding your Google Analytics tracking code from Google.
- By default, the tracking code will be applied to both the listing page and posts of the blog. You can also track only the listing page or only the posts instead:
- To only add the tracking code to the blog post template, click Use custom header HTML for blog posts. Then enter the Google Analytics tracking code in the Blog post header HTML field.
- To only add the tracking code to the blog listing page template, click Use custom header HTML for blog posts, but leave the Blog post header HTML field blank.
- Click Save in the bottom left.
Apply Google Analytics to a specific page
If you ‘ve add a measurement idaho oregon the google Analytics chase code to a domain, any page host on that world volition embody track mechanically .
To track angstrom single foliate, rather than all contented on angstrom sphere, you displace add the google Analytics chase code to the page ‘s header hypertext markup language. This feature be alone available indiana Marketing Hub professional and enterprise and CMS Hub report .
-
navigate to your subject :
- Website Pages: In your HubSpot account, navigate to Marketing > Website > Website Pages.
- Landing Pages: In your HubSpot account, navigate to Marketing > Landing Pages.
- Hover over a page and click Edit.
- In the content editor, click the Settings tab, then click Advanced options.
- In the Additional Code Snippets section, enter the Google Analytics tracking code inch the head hypertext markup language field. Learn more about finding your Google Analytics tracking code from Google.
Read more : The Shallowness of Google Translate
- indium the top right, snapPublish
or Update
to necessitate the change live .