Contact Property not updating - API integration issue


Hi everybody!

I'm looking for help!!!

I explain my situation:

  1. We have an event site call the and we sell tickets on another site linked to the previous one

  2. We have integrate the two sites via API and Hubspot Javascript tracking code is in both site using GTM

  3. Our Hubspot is integrated with the ticketing site and contact/deal properties get populated via API from the ticketing site to HS

  4. One property is called "cart abandonment property" and this property is populated to "yes" once a new user login to the ticketing platform (contacts get created in Hubspot) and then abandon the cart

Until here is all good!

The problem is if the contact is already in our HS database:

  1.   We sent an EDM from HS to our database to sell tickets
  2.   The user will click on the EDM
  3.   The user will reach the ticketing landing page
  4.   The user will progress to the ticketing platform
  5.   The user will abandon the cart before logging in
  6.   The contact property Cart Abandonment should be filled but is not!
  7.    We've built this so when someone abandons a cart (not logged in), the ticketing platform can ping the contacts API to check if the contact exist by looking at the token , 
  8.    If they can identify the contact, we will then use the  update contacts API to update the cart abandonment property

My developers said this:

" This is a hubspot tracking issue we debugged to make sure our end was doing as designed. My belief is it’s the use of the landing page I also don’t know enough about hubspot JavaScript tracking to be able to speak with authority on debugging the GTM or hubspot issue - which is why I mentioned asking your support resource there to look into the issue

We are using the get by UTK, But something from that is returning the wrong VID for the user. It seems that we have the tracking js on the ticketing site but the js APIs on the two are different
We’re getting a UTK and tracking it as expected, so there is an integration isssue on the JS tracking side somewhere.
The tracking on our site seems to be misaligning

I can see we are getting the cookie as set by the tracking on your bounce page, and that we are using the right environment / API key - I can’t really see why the UTK wouldn’t match / exist when looking up in their system

I can reproduce without even using our integration. I can get the UTK from your site after clicking on an email link (never going to KZ) from my cookies, then try to look the user up by the UTK - and it won’t return anything. But if I look up by email it does"

And also:

"nothing on your email is leading to a page that sends the UTK to our web page that I can find. But the hubspot cookie is set once it seems. Looking at the complete flow, I don't think the functionality is actually broken on our end. I successfully get a UTK assigned. One of the issues seems to be you are tied to a UTK per browser (I cant get a new one to stick unless I go incognito) - this leads old UTKs being assigned to your current session even if its a different UTK.

Things to check on the integration side - and might be worth getting your support specialist to go through the flow with you, or even us, to verify.

  1. That the right hubspot code is being used in your GTM container that we import from you. I see the hs analytics, on our site, but different hubspot tracking code on yours on top of that
  2. Check how cookies stick across session with them
  3. Verify how vids are linked to UTKs - I sent another test email impersonating mine in an Incognito window - in one case I got the correct vid - in a second email I got 10802001 which is not a created contact - this value is coming from hubspot directly not our end."

Can somebody please help me with this one?
Let me know if you need any more details.

Thanks in advance!


Hi @federico.vanni,

Ok, so there's a lot going on here. I'm going to try and break down some info shortly, but the most helpful piece of information I can get from you is the Hub ID of the portal you're referring to.

Anyway, to address your questions individually:

  1. I'll need to actually check out your live site to say for sure whether or not you're including the right tracking code, but I'd be surprised if that was the issue
  2. Here's a few different bits of info on the HubSpot tracking cookie (hubspotutk):
    1. The HubSpot UTK cookie is domain-specific, so it's shared across all of your sub domains.
    2. The cookie itself persists across sessions in the sense that a visitor who navigates to your site, then leaves your site, then comes back to your site the next day will have the same usertoken.
    3. The cookie remains constant in a given browser; if multiple different people use the same device/browser, their activity will be associated with the same usertoken (and by extension, the same contact record)
    4. A usertoken does not always correspond to a contact record. Usertokens are created when a visitor navigates to your site, but a corresponding contact record isn't created until that visitor is identified via one of the following methods:
      1. Conversion on a form
      2. The Identify function of the Tracking Code API
      3. Email click tracking parameters (i.e. an email recipient clicks a link in an email, which opens in a browser that has an existing usertoken)

Let me know if this info helps answer your question(s), and please don't hesitate to reach back out with your Hub ID so that we can dig into this further.