HubSpot tracking URLs that HubSpot and GA4 both file correctly
HubSpot builds tracking URLs under Settings, Tracking & Analytics, Tracking URLs, and sorts every visit with its own 15 ordered rules. GA4 sorts the same URL with different rules. Tag with a network both tools recognise and a plain channel word, such as linkedin and social, and the visit lands in the same place in both.
The interactive UTM builder loads with this page, pre-filled for HubSpot, and runs entirely in your browser.
HubSpot's first rule files a medium of social with a recognised network as the source under Organic social, and LinkedIn is on its list. Google files linkedin under social as well, so GA4 reaches the same answer: Organic Social.
Where to put it
In HubSpot, click the settings icon in the top bar, then Tracking & Analytics, Tracking URLs, Create tracking URL. You need marketing Reporting permissions.
Enter the page URL with its protocol. HubSpot says it can be any page with the HubSpot tracking code installed.
Pick a UTM campaign. It's required, because HubSpot uses the campaign name in several reports and credits visits to it.
Pick a Source. Only Other campaigns lets you type your own value. Medium, term and content are optional in HubSpot, but GA4 needs the medium, so fill it in.
Or paste the URL from the builder above straight into your post or ad. HubSpot sorts visits by the parameters in the URL, whichever tool built it.
"Contains the word email." That is how HubSpot's seventh rule decides a visit came from email marketing: the word anywhere in utm_source, utm_medium, utm_campaign or source. GA4 is stricter. Its Email channel wants the source or the medium to equal email. A link tagged utm_source=newsletter&utm_medium=email-digest is Email marketing in HubSpot and fits no GA4 channel at all, so GA4 reports it as Unassigned. Keep the medium one plain word, utm_medium=email, and both tools agree.
HubSpot works down its list in order. Rule 1 is a medium of social with a recognised network as the source. Rules 2, 3, 5 and 6 are paid search: adword, ppc or cpc in the parameters, a valid gclid, or any UTM on a visit referred by google.com. Rule 4 is paid social, including a medium containing paid, ppc or cpc with a recognised network as the source. Tagged visits that fit none of those, and aren't AI referrals (rule 8), fall to rule 9, Other campaigns.
The two network lists don't match. HubSpot's recognised networks include X but not Twitter. Google's source list is the reverse: it has twitter and no x. So utm_source=twitter&utm_medium=social is Organic Social in GA4, while HubSpot's first rule only counts it as Organic social if the visit's referring domain is a social site. Paid tags split the other way, since GA4 only grants Paid Social to sources on its own list: with a paid medium, x ends up as Paid Other in GA4. HubSpot's page doesn't say whether its name match ignores capitals, so send one test visit and check the Sources report. Before you settle on a source, check it's on both lists; the X ads UTM builder covers GA4's side.
HubSpot's own emails tag themselves. The marketing email tool adds utm_campaign when an email belongs to a campaign, and utm_content with the email's name. Emails sent without a campaign carry hs_email as the campaign, and workflow emails carry hs_automation. Build tags here for the links HubSpot doesn't send for you: social posts, ads, partner and print links.
Use the full URL in Google ads. HubSpot's help says to put the full tracking URL in Google ads, not HubSpot's short link. With auto-tagging on, GA4 reads gclid there rather than your tags; the Google Ads UTM builder covers that trade-off.
Questions
How does HubSpot use UTM parameters to categorize traffic to your website?
It checks each visit's first page URL and referring domain against 15 rules, in order. The early rules read UTM values: a medium of social with a recognised network is Organic social, adword, ppc or cpc signals paid search, and the word email anywhere in the tags is Email marketing. Tagged visits that match none of those become Other campaigns.
What is a UTM builder?
A form that adds utm_source, utm_medium, utm_campaign and optionally utm_term and utm_content to a URL, so you don't type them by hand. HubSpot's version is Tracking URLs in settings; the builder on this page produces the same kind of URL outside HubSpot.
Is a campaign required for a HubSpot tracking URL?
Yes. HubSpot requires a UTM campaign because it uses the campaign name in several reports, and visits to the tracking URL are credited to that campaign in the sources report and the campaigns tool.