Hi everyone,
I’m trying to attribute custom events fired from GTM to the correct HubSpot contact records, but the events are consistently showing as “Unknown User” even when the user is already a known contact. I’ve already confirmed that my GTM tags are firing correctly and that the events are being received by HubSpot.
I’m hoping someone in the community might have a solution or a workaround for associating these events with the correct contact records.
Here is a quick overview of our user journey;
- User visit the website and clicks to get a quote
- User is redirected to our quote flow, where the Hubspot base tracking code and GTM container are loaded on application start.
- User enters an email address to log in or sign up
- User is sent a one-time verification code via email
- User enters the verification code and is authenticated.
- The “Quote Started” custom event tag is fired from GTM
- User answers questions and the “Quote Completed” custom event tag is fired from GTM
- A new contact and deal are created in Hubspot via an API call from our lead management system
- The user proceeds through the payment flow, and the “Payment Initiated” and "Purchase Completed" custom event tags are fired.
The challenge i’m facing is associating the early events (Step 6 & 7) with the contact record that is created in step 8.
Our main constraints are:
- We cannot expose the user’s email address as a GTM variable due to security and privacy policies.
- We have already tried using a hubspotutk variable, but the events still don’t seem to associate with the contact record because the events fire before the contact is created and officially identified.
Given these constraints, has anyone found a workaround or an alternative method to get these GTM events to associate with the correct contact record?
I’m open to any solutions or insights you might have.
Thanks,
David