We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jun 17, 2019 6:12 PM
Hey everyone.
I am building out our hubspot integration for our website. We'd like to set up visitation tracking. One of our engineers indicated it might be sensible for us to do this tracking on the serverside, rather than installing hubspots tracking code.
Is that possible? Are there any examples of how you would do this? I'm currently on marketing / sales professional.
Solved! Go to Solution.
Jun 18, 2019 9:16 AM
Welcome, @mrich.
At this time, it's not possible to implement HubSpot page tracking server-side. All of the Tracking Code API methods leverage the embedded script loader except:
Neither of these alternative solutions are as robust and flexible as native HubSpot page tracking, however. For example, their statistics cannot be pulled from the Analytics API.
Does your team have specific concerns with the HubSpot tracking code on your site?
Please let me know if you have additional questions or if I have misunderstood you.
Isaac TakushiAssociate Certification Manager |
Jun 18, 2019 9:16 AM
Welcome, @mrich.
At this time, it's not possible to implement HubSpot page tracking server-side. All of the Tracking Code API methods leverage the embedded script loader except:
Neither of these alternative solutions are as robust and flexible as native HubSpot page tracking, however. For example, their statistics cannot be pulled from the Analytics API.
Does your team have specific concerns with the HubSpot tracking code on your site?
Please let me know if you have additional questions or if I have misunderstood you.
Isaac TakushiAssociate Certification Manager |
Jul 28, 2021 4:24 AM
Hi Isaac,
I was wondering if it still not possible to implement page tracking server-side. Main reason for asking is that Safari is deleting first party cookies after one day and more browsers will follow.. Now we continuously have to rely on the visitor opening the e-mail in order to track behaviour (and the actions within a workflow).
Thanks in advance for your response.
Jun 18, 2019 2:35 PM
> Does your team have specific concerns with the HubSpot tracking code on your site?
It seems the hubspot tracking code wouldn't be able to track page visits on our native mobile apps if it's a js clientside library only. Server side logging / tracking would enable us to collect data from all of our platforms. Is that not supported in HubSpot?
Also, Segment seems to imply they can send data over to hubspot from server side logging (under the 'server' section). Isn't that implying you can send page visits over from serverside logging or am I misreading that?
Jun 18, 2019 4:41 PM
Hi, @mrich.
Correct, HubSpot does not support server-side page view tracking. The closest two solutions are the ones I outlined above.
Segment's documentation could be a bit clearer. The analytics.track
method described in the Server section (beginning with the sentence "When calling from any of our server-side sources") uses the Events HTTP API I mentioned earlier. This process is distinct from the page view tracking of the JavaScript snippet.
This server-side endpoint leverages custom events and so requires an Enterprise HubSpot subscription. Segment's documentation notes this in the preceding paragraph:
"IMPORTANT: You must have a HubSpot Enterprise account for traits from an identify
call to be passed through to your track
call and be successfully sent as a custom event to HubSpot."
Isaac TakushiAssociate Certification Manager |
Jun 18, 2019 5:27 PM
Cool, that answers my questions. Thanks @IsaacTakushi