Web Analytics Events - Logins/Sessions

Hi All,

Does anyone know what event would refer to a login/session start for the web analytics? We have reports that show the number of page views and number of sessions for contacts and I’m trying to recreate these through the API. I believe e_visited_page refers to page views but I’m not sure what event is a session start/login? We have the tracking code on our website.

Thanks!

Here are my list of events that I get when I api call to `**https://api.hubapi.com/events/v3/events/event-types**\`:

{
 "eventTypes": [
 "e_v2_sequence_step_executed",
 "e_entered_delay_action",
 "e_my_new_event_name4",
 "e_sequence_errored",
 "e_form_completion_v2",
 "e_contact_unenrolled_manually_from_sequence",
 "e_v2_sequence_errored",
 "e_contact_enrolled_in_sequence",
 "e_attended_marketing_event_rollup",
 "e_v1_contact_booked_meeting_through_sequence",
 "e_exited_delay_action",
 "e_invalid_custom_behavioral_event_completion",
 "e_sequence_enrollment_unpaused",
 "e_meeting_booked",
 "e_v1_sequence_step_executed",
 "e_document_viewed",
 "e_v2_contact_unenrolled_from_sequence",
 "e_deal_split_updated",
 "e_joined_marketing_event",
 "e_bot_module_session_status_changed_v2",
 "e_forecast_submitted_v1",
 "e_v2_contact_finished_sequence",
 "e_clicked_page",
 "e_messaging_outbound_message_failed",
 "e_v6_replied_to_tracked_inbox_email",
 "e_sequence_enrollment_paused",
 "e_v1_sequence_errored",
 "e_bot_session_status_changed_v2",
 "e_exited_delay_action_v3",
 "e_form_view",
 "e_v5_replied_to_tracked_inbox_email",
 "e_site_searched",
 "e_approval_concluded",
 "e_ecommerce_order_update",
 "e_document_viewed_v2",
 "e_marketing_event_registration",
 "e_ad_metrics_imported_v0",
 "e_v1_contact_unsubscribed_sequence_email",
 "e_v2_contact_unenrolled_from_sequence_via_workflow",
 "e_form_interaction",
 "e_v6_sent_tracked_inbox_email",
 "e_cms_url_requested",
 "e_site_search_converted",
 "e_sequence_step_executed",
 "e_e_form_pop_up_visible",
 "e_exited_delay_action_v5",
 "e_contact_unenrolled_from_sequence",
 "e_v2_contact_clicked_sequence_email",
 "e_contact_unsubscribed_sequence_email",
 "e_approval_approved",
 "e_entered_delay_action_v2",
 "e_object_exited_delay",
 "e_contact_booked_meeting_through_sequence",
 "e_v2_contact_unsubscribed_sequence_email",
 "e_ai_customer_agent_visitor_feedback_received",
 "e_approval_step_approved",
 "e_v2_contact_enrolled_in_sequence",
 "e_v5_sent_tracked_inbox_email",
 "e_entered_delay_action_v3",
 "e_social_channel_stats_determined",
 "e_form_pop_up_view_v2",
 "e_v5_clicked_link_in_tracked_inbox_email",
 "e_social_channel_stats_determined_v2",
 "e_entered_delay_action_v4",
 "e_list_size_changed",
 "e_v1_contact_replied_sequence_email",
 "e_partner_poi_agreement_quote_action",
 "e_form_view_v2",
 "e_mb_attention_span",
 "e_sent_tracked_inbox_email_v7",
 "e_form_install_v2",
 "e_left_marketing_event",
 "e_exited_delay_action_v4",
 "e_clicked_link_in_tracked_inbox_email_v7",
 "e_enterprise_event_completed",
 "e_v2_contact_unenrolled_manually_from_sequence",
 "e_social_channel_post_count_determined_v2",
 "e_form_completion",
 "e_user_performed_action_no_object_type",
 "e_partner_tier_points_changed",
 "e_approval_created",
 "e_v1_contact_unenrolled_from_sequence",
 "e_mb_media_played_percent",
 "e_data_privacy_request_completed",
 "e_contact_replied_sequence_email",
 "e_v6_clicked_link_in_tracked_inbox_email",
 "e_approval_rejected",
 "e_v2_contact_replied_sequence_email",
 "e_marketing_event_completed",
 "e_contact_finished_sequence",
 "e_deal_split_deleted",
 "e_cancelled_marketing_event",
 "e_marketing_event_cancellation",
 "e_registered_marketing_event",
 "e_v6_opened_tracked_inbox_email",
 "e_v1_contact_unenrolled_manually_from_sequence",
 "e_form_submission_v2",
 "e_attended_marketing_event",
 "e_forecast_submitted",
 "e_form_install",
 "e_v2_sequence_email_bounced",
 "e_social_channel_post_count_determined",
 "e_document_shared",
 "e_user_performed_action",
 "e_object_entered_delay",
 "e_object_influenced_marketing_campaign_v4",
 "e_entered_delay_action_v5",
 "e_mb_media_played",
 "e_approval_canceled",
 "e_marketing_event_attendance",
 "e_meeting_outcome_changed",
 "e_marketplace_mirrored_app_details_event",
 "e_document_completed_v2",
 "e_messaging_outbound_message_sent",
 "e_v2_contact_booked_meeting_through_sequence",
 "e_messaging_outbound_message_delivered",
 "e_privacy_center_request_submitted",
 "e_messaging_outbound_message_opened",
 "e_form_submission",
 "e_visited_page",
 "e_object_list_membership_changed",
 "e_replied_to_tracked_inbox_email_v7",
 "e_form_pop_up_visible",
 "e_contact_started_conversation",
 "e_document_shared_v2",
 "e_sequence_email_bounced",
 "e_opened_tracked_inbox_email_v7",
 "e_marketing_event_noshow",
 "e_call_mentioned_keyword",
 "e_exited_delay_action_v2",
 "e_v1_sequence_email_bounced",
 "e_form_interaction_v2",
 "e_contact_clicked_sequence_email",
 "e_form_pop_up_view",
 "e_deal_split_created",
 "e_v5_opened_tracked_inbox_email",
 "e_document_completed",
 "e_approval_updated",
 "e_submitted_form",
 "e_ecommerce_product_view",
 "ae1465340_integrators-timeline-event-type-id-1213191",
 "ae1465340_integrators-timeline-event-type-id-1213196",
 "ae1465340_integrators-timeline-event-type-id-1213200",
 "ae1465340_integrators-timeline-event-type-id-1213203",
 "ae1465340_integrators-timeline-event-type-id-1213194",
 "ae56440_integrators-timeline-event-type-id-387067",
 "ae1465340_integrators-timeline-event-type-id-1213202",
 "ae1465340_integrators-timeline-event-type-id-1213190",
 "ae56440_integrators-timeline-event-type-id-387069",
 "ae1465340_integrators-timeline-event-type-id-1213189",
 "ae1465340_integrators-timeline-event-type-id-1213197",
 "ae221635_integrators-timeline-event-type-id-1310633",
 "ae56440_integrators-timeline-event-type-id-387070",
 "ae1465340_integrators-timeline-event-type-id-1213195",
 "ae56440_integrators-timeline-event-type-id-387068",
 "ae1465340_integrators-timeline-event-type-id-1213201",
 "ae1465340_integrators-timeline-event-type-id-1213192",
 "ae221635_integrators-timeline-event-type-id-2837145",
 "ae1465340_integrators-timeline-event-type-id-1213198",
 "ae1465340_integrators-timeline-event-type-id-1213193",
 "ae1465340_integrators-timeline-event-type-id-1213188",
 "ae1465340_integrators-timeline-event-type-id-1213199"
 ]
}

Hey, @OMorgan25 :waving_hand: Thank you for the interesting question. I think you are on the right path here. Based on my read of the documentation, session logic is defined based on a few factors.

Starts:

  • First e_visited_page event occurs
  • User returns after 30+ minutes of inactivity
  • User comer from a new campaign source
  • After midnight in account timezone

Ends:

  • 30 minutes of inactivity
  • At midnight (account timezone)
  • Campaign source changes

My guess is that you’ll need to:

  • Pull e_visited_page
  • Track timestamp gaps
  • Check for campaign source changes
  • Account for timezone midnight breaks

I wish I had a simpler suggestion to offer. We’ll leave this open in case other community members have a suggestion for you.

Best,

Jaycee

Hi, thank you for your response :slightly_smiling_face:
I notice the documentation mentions a session includes events other than just page_views, do you have any idea what other events this could include? I noticed when doing the above calculation, my calculated session number tends to always be lower than what my reports show.