Hello HS People,
I’m trying to track downloads using HS Custom Events and associate them with the correct contact using the hubspotutk. However, even though the events are being tracked, they’re not being associated with the contacts.
- The events show up in HubSpot
- The contact properties show as “unknown”
- The events are not being associated with contacts despite passing the hubspotutk and the defaut properties seems not to have an field therefor
What’s the correct way to associate Custom Events with contacts using the hubspotutk? Is there a specific method or additional step I’m missing?
Any help would be greatly appreciated!
Hi, @Hutfuchs
Thanks for your question. I have a few questions of my own that may give our community members more to information to work with:
- Could you share the JavaScript snippet you’re using to track the custom event?
- Can you check your browser’s network tab when triggering the event and share the response from the HubSpot API call?
- Add this code and share the output to verify the hubspotutk cookie exists (I tested using the browser console, and it returned the expected output):
console.log("HubSpot Cookie:", document.cookie.replace(/(?:(?:^|.*;\s*)hubspotutk\s*\=\s*([^;]*).*$)|^.*$/, "$1"));
- Please verify your HubSpot tracking code is properly installed by checking if this returns true(I tested using the browser console, and it returned the expected output):
console.log("HubSpot Tracking Loaded:", typeof window._hsq !== 'undefined');
Hopefully, we start to pin down where the tracking issue is. Have fun testing! — Jaycee