I’m having trouble getting source attribution for a custom event in HubSpot.
We’ve created a custom event in HubSpot via Google Tag Manager to track successful bookings. The event completion is being captured correctly, but we cannot see the source channel for the event.
Our setup includes:
- A main website (mymainwebsite.com) and a booking app hosted on a subdomain (booking.mymainwebsite.com).
- HubSpot tracking code is installed on both domains.
- Cross-domain tracking is enabled.
The event completion is being captured fine but we can’t see the source of the event. We want to be able to see the default source channels like Paid Search, Organic Search, and Direct Traffic, similar to how we can see the data in Google Analytics. Is this default channel grouping even possible? It seems I can only report based on UTM source, UTM campaign, etc.
Our HubSpot custom event uses the default properties which include “hs_touchpoint_source property” but this always shows as undefined, even if the UTM source is known. Should this be displaying one of the interaction sources as described here or am I missing something?
Additionally, UTM parameters do not persist between the main website and the booking subdomain. If a user lands on mymainwebsite.com?utm_campaign=mycampaign, the UTM parameters are lost when they navigate to booking.mymainwebsite.com.
My questions:
How can I ensure I capture the correct source for the custom event so I can report on it effectively in HubSpot?
Is it possible to maintain UTM parameter persistence between the main site and the booking subdomain without having to manually modify all URLs on the booking buttons?
Any guidance or suggestions would be greatly appreciated!
Hey @DankaHS, thank you for posting in our Community!
It sounds like the issue is related to UTM parameter persistence between your main site and subdomain.
While the HubSpot tracking code and cross-domain tracking are set up, you may need to ensure both domains are correctly listed under HubSpot’s cross-domain settings.
Additionally, UTM parameters won’t persist automatically unless you implement a solution like appending them to links directing users to the subdomain.
For source attribution, confirm that the HubSpot tracking code is the same across both domains and test whether the hs_touchpoint_source property captures data after fixing parameter persistence.
I have the exact same setup, did you manage to get this fixed? What part of the tracking code should I be testing is the same across both sites?
Did you end up needing to pass UTM paramaters across to get the hs_touchpoint_source accurate?
Thanks!
I have definitely installed the tracking code and have a good understanding of that.
We have the HubSpot forms api setup passing hutk to get some sort of source data. But we were hoping to migrate this to custom events as not all events we are good to use a form for.
Hi @Kobekapoor and thanks for the additional information!
I’d love to put you in touch with our Top Experts: Hi @sylvain_tirreau, @danmoyle and @Anton do you have any insights to share with @Kobekapoor, please?
Have a great day and thanks so much!
Bérangère
Thanks for thinking of me @BérangèreL - an welcome to the community @Kobekapoor. I wish I had some genuine solution to offer here, but I have not had this come up in my own usage, nor with clients. The best I can do is offer a little research.
I found this interesting insight, I don’t know if it will help with troubleshooting but wanted to share.
Standard UTM parameters (utm_source, utm_medium, utm_campaign) are only present in the URL on the initial landing page. They do not persist between domains unless they are:
Thanks heaps for this!
Great info
When passing hutk in a script/api, should I be passing that in the properties or outside?
_hsq.push([
‘trackCustomBehavioralEvent’,
{
name: “pe441883400_location_selected”,
properties: {
location: locationName,
hutk: HUBSPOTUTKTOKEN
},
},
]);
OR
_hsq.push([
‘trackCustomBehavioralEvent’,
{
name: “pe441883400_location_selected”,
properties: {
location: locationName,
},
hutk: HUBSPOTUTKTOKEN
},
]);
Hi @Kobekapoor and thanks for getting back to us!
When using trackCustomBehavioralEvent with the JavaScript API, hutk should be passed OUTSIDE of the properties object, as shown in your second example.
The hutk parameter is used for source attribution and should be at the same level as name and properties, not nested inside properties.
This allows HubSpot to properly associate the event with the visitor’s tracking cookie for attribution purposes.
I hope this helps!
Bérangère This post was created with the assistance of AI tools.
I don’t work with that client anymore, but up until the time I did, it still wasn’t working as expected. The hs_touchpoint_source property remained empty when the visit came from a URL without UTM parameters.
We’ve fixed the UTM parameter persistence and it is working now, and we can see the values in the reports.
However, the hs_touchpoint_source is still empty. If a user is coming from an URL without UTM parameters (say it went directly to the website and from there click the button to the page to complete the booking) and the custom event is completed, how can I see the source like “direct traffic”?
Sorry if it’s a silly question, I’m new to custom events and still getting my head around on how they work.
Thank you,