am using segment as a source and hubpost as destination . currently am on Entriprise plan of hub spot.
what am trying to do is update a contact custom properties . but this is not happening.
when using this code as follow :- analytics.page() analytics.identify(22,{ some_custom_prop : 20 }) analytics.track('Some Event')
the contact properties aren't updated . but when using segment event tester the contact properties are updated .
i tried to reach segment . but after conversation this was there reply :-
Hi Ahmed, I did a few tests today and Segment does appear to be loading HubSpot on your website: And we do appear to be sending data: (Screenshot) I'm not 100% sure why that data is not being received in HubSpot after a bit of poking around, on our end it looks like it should be. I'd recommend as a next step, reaching out to HubSpot support. I know they have a portal, so you can't really loop me in, but let me know what they say, and if I can provide additional information. That said, right now, from the Segment side, you seem good to go! Best, Tori Success Engineer @ Segment
To get a full picture of thing, are you trying to use Segment and pass form submission data into HubSpot? If so, do you mind sharing with me how are you doing this? And do you mean that all the default properties got pass through just fine except for the custom property? Could you share with me the custom properties you're referring to?
On my end, I submitted the registration form and login upon registration and I'm able to see that both form submission (login and registration form) has been recorded in your portal 6123641. I'm also able to see the form submission details information such as email and phone number.
Looking forward to your reply so that we can work together to resolve this issue!
When looking into the custom properties that you have created in your portal 6123641, I noticed that while there's a custom property with an internal value subscribers_count, I wasn't able to locate the campaigns_count property.
Additionally, the subscribers_count property has a field type of 'single-line text' however it seems that you'd like to pass it an integer which should be a field type 'number' in HubSpot.
I believe it is not coming through because:
#1 The subscribers_count property field type is wrongly mapped and
Digging further into this, I went into your portal 6123641 and locate the contact with the email address: ahmedlocaltest@gmail.com. I noticed that the default contact properties didn't got pass through as well (firstname, lastname) which you mentioned it previously did. Would you mind checking if the test you conduct previously matches with this test?
The reason I asked this is because, when looking through the segment documentation here: https://segment.com/docs/destinations/hubspot/, I would believe you would need to first run the identify method then track it.
On top of that, HubSpot default properties doesn't have the underscore
e.g. for first name - the internal value is firstName,
for last name - the internal value is lastName
for phone number - the internal value is phone
As such, it doesn't appear to me that the test you run would update the default properties as well.
analytics.track("Clicked Buy Now button", {
value: 20.5
})
Let me know if this created a contact?
On my end, I also tried using our identify function and both the trackPageView or trackEvent functions and my contact hstestoct15@hstest.com was created successfully on your portal 6123641
I would expect that if this is working, using it on segment would work as well.
your example worked fine . but there's some cases i have tried.
after creating `htest` user i deleted it and then tried to recreate it. but didn't create . then after i changed the identify id it created again .
another thing i tried to use first_name , last_name with the same example and it worked . cause i think segment is smart enought to change the properties as hubspot api wants .
and the last thing the email property isn't set as specified. like if i put '
hstest123@hstest.com' . i found the email in hubspot as my logged in email on my app 'ahmedlocaltest@gmail.com' .
"The tracking code API is different, though; with the tracking code API, contacts can be created as a result of normal visitor tracking. If a contact is deleted by a user, we’ll stop collecting their analytics info. Since the tracking code API contact creation occurs as a result of the normal visitor tracking, we’ll also stop collecting that. This mirrors the way the existing visit/page view tracking functions. Note that if the contact submits a form, or is created by a user, the analytics info will still exist and continue being collected."
i hope this helps to clarify things.
As for the contact logging it as ahmedlocaltest@gmail.com, that's truly strange. Would you mind trying in on a private (incognito) browser to prevent any caching or cookie issue and see if it creates a new contact instead of overwriting it?
for email i tried to open from new icongnito window and make hard reload but still it takes the current email i logged in with . but currently that's not a problem .
my main problem is custom and normal properties aren't set . so when trying this structure from segment it didn't add the default properties. not sure why
That's odd. I ran another test to track both custom property - subscribers count and default property - firstName and I was able to see that the contact hstestoct16@hstest.com has both the firstName and subscribers count property updated via the tracking code API:
Since we are unable to reproduce this behavior when using the HubSpot identify and track pageviews/event function, it could be that Segment is passing custom properties differently. Your team may want to check in with them and pass along our testing. Let me know how it goes!