APIs & Integrations

yellalingh
Participant

Contact properties page views and page visits

SOLVE

Hi Team,

 

I am using contacts api to get contact properties "hs_analytics_num_visits" and "hs_analytics_num_page_views"  data miss matches api gives data in 75 and 79 respectively for the propertiesof the contact "26602086" where as in Hubspot application I can see 13 and 13 site visits and page views. Can you please help me understand this,if i am missing something

 

0 Upvotes
3 Accepted solutions
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

When I make a request to contacts/v1/contact/vid/26602086/profile?property=hs_analytics_num_visits&property=hs_analytics_num_page_views, I see 14 as the current value for both of those properties.

 

Are you still encountering the issue? If so, could you share the full request URL (without authentication details) and the portions of the response body corresponding to those properties?

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
yellalingh
Solution
Participant

Contact properties page views and page visits

SOLVE

Thanks @IsaacTakushi 

I Got it actually was not adding "&" in request URL. it fixed the issue

 

View solution in original post

IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

Apologies for the delayed response.

 

Thank you for clarifying. At this time, however, HubSpot does not support that use case.

 

There is no way to distinguish a page view on a contact record as coming from direct traffic versus via email. The page views do not exist as distinct events with referral meta data that can be extracted via API.

 

If you are viewing the contact record, you might be able to see an email click followed by a page view and conclude that that page view originated from the email (this is how HubSpot reports make the connection), but that information is currently not available via any API.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
13 Replies 13
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

When I make a request to contacts/v1/contact/vid/26602086/profile?property=hs_analytics_num_visits&property=hs_analytics_num_page_views, I see 14 as the current value for both of those properties.

 

Are you still encountering the issue? If so, could you share the full request URL (without authentication details) and the portions of the response body corresponding to those properties?

Isaac Takushi

Associate Certification Manager
0 Upvotes
yellalingh
Solution
Participant

Contact properties page views and page visits

SOLVE

Thanks @IsaacTakushi 

I Got it actually was not adding "&" in request URL. it fixed the issue

 

yellalingh
Participant

Contact properties page views and page visits

SOLVE

HI @IsaacTakushi  

 

Can you please let me know how can i get more details of page visits and page views. example: pages which contact has visited and the time at which contact has viwed. currently I am using get contact by id and getting versions of page views and site visits. is it possible to get the url  whihc has been viewed 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

At this time, it is not possible to retrieve granular page view data via API, but I recommend subscribing to the Developer Changelog for updates in this space.

 

Currently, the best workaround is to look at the history of a contact's Last page seen (hs_analytics_last_url) value.

 

For example, if you were using this endpoint, you could use the request URL:

https://api.hubapi.com/contacts/v1/contact/vid/26602086/profile?property=hs_analytics_last_url&propertyMode=value_and_history

Isaac Takushi

Associate Certification Manager
0 Upvotes
yellalingh
Participant

Contact properties page views and page visits

SOLVE

Thanks for the support, 

 

Can you please let me know if a contact visits the site not via campaign will this be recoreded as a part of pageveiw.

als is there a timelimit for the cookies set in the browser 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

Apologies for the delayed response.

 

Yes, as long as the HubSpot tracking code is installed and firing, it will capture page views and associate them with contact records when it knows the contact's email through a form submission, email click, or other methods like the Tracking Code API. It does not matter if campaign parameters are empty.

 

You can find the various HubSpot cookie expiration times in this article. The main identity tracking cookie, hubspotutk, expires after 13 months.

Isaac Takushi

Associate Certification Manager
0 Upvotes
yellalingh
Participant

Contact properties page views and page visits

SOLVE

Thanks a lot for the support @IsaacTakushi 

 

Can you please let me know if I can differentiate between direct visit to site and visit via email to site. Thanks a lot in advance 

 

 

 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

Depending on your use case, it's possible to do this within the traffic analytics tool, since there are categories for "Direct traffic" and "Email marketing," but it's not possible to easily distinguish views from these sources on contact records or within lists or on contact records.

 

Please let me know if I can clarify further.

Isaac Takushi

Associate Certification Manager
0 Upvotes
yellalingh
Participant

Contact properties page views and page visits

SOLVE

Thanks @IsaacTakushi 

 

I get its not possible easly to get detiails for direct traffic and email trafic, is there any work around for this

 

 

 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

What is your end goal? Do you wish to distinguish page views on contact records, segment based on page views from the different sources in lists and workflows, or something else? There may be ways to get you closer to your goal, but I'll need to understand it in more detail.

Isaac Takushi

Associate Certification Manager
0 Upvotes
yellalingh
Participant

Contact properties page views and page visits

SOLVE

HI @IsaacTakushi 

 

My end goal is to develop an ETL which tells page views directly trafic and email trafic. Write now By using get contact by id in history mode I am able to get the urls for page views.

 

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact properties page views and page visits

SOLVE

Hi, @yellalingh.

 

Apologies for the delayed response.

 

Thank you for clarifying. At this time, however, HubSpot does not support that use case.

 

There is no way to distinguish a page view on a contact record as coming from direct traffic versus via email. The page views do not exist as distinct events with referral meta data that can be extracted via API.

 

If you are viewing the contact record, you might be able to see an email click followed by a page view and conclude that that page view originated from the email (this is how HubSpot reports make the connection), but that information is currently not available via any API.

Isaac Takushi

Associate Certification Manager
0 Upvotes
MAgarwal77
Member

Contact properties page views and page visits

SOLVE

Hello Isaac, Is the API available now? We want to get the page views data via API as shown in the activity on the hubspot UI (image attached).image-20221104-150844.png