Class: HubSpotSDK::Models::Cms::AttentionSpanEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- HubSpotSDK::Models::Cms::AttentionSpanEvent
- Defined in:
- lib/hubspot_sdk/models/cms/attention_span_event.rb
Overview
Defined Under Namespace
Modules: ExternalPlayContext, MediaType
Instance Attribute Summary collapse
-
#contact_id ⇒ Integer
The ID of the contact in HubSpot’s system that consumed the media.
- #external_play_context ⇒ Symbol, ...
- #media_bridge_id ⇒ Integer
- #media_bridge_object_coordinates ⇒ String
- #media_bridge_object_type_id ⇒ String
- #media_name ⇒ String
- #media_type ⇒ Symbol, HubSpotSDK::Models::Cms::AttentionSpanEvent::MediaType
- #media_url ⇒ String?
-
#occurred_timestamp ⇒ Integer
The timestamp at which this event occurred, in milliseconds since the epoch.
-
#page_id ⇒ Integer?
The ID of the page, if hosted on HubSpot.
-
#page_name ⇒ String?
The name of the page.
- #page_object_coordinates ⇒ String?
-
#page_url ⇒ String?
The URL of the page that an event happened on.
- #percent_range ⇒ String
-
#portal_id ⇒ Integer
The ID of the HubSpot account.
- #provider_id ⇒ Integer
-
#raw_data ⇒ String?
This is the raw data which provides the most granular data about spans of the media, and how many times each span was consumed by the user.
- #session_id ⇒ String
-
#total_percent_played ⇒ Float
The percent of the media that the user consumed.
-
#total_seconds_played ⇒ Integer?
The seconds that a user spent consuming the media.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(contact_id:, media_bridge_id:, media_bridge_object_coordinates:, media_bridge_object_type_id:, media_name:, media_type:, occurred_timestamp:, percent_range:, portal_id:, provider_id:, session_id:, total_percent_played:, external_play_context: nil, media_url: nil, page_id: nil, page_name: nil, page_object_coordinates: nil, page_url: nil, raw_data: nil, total_seconds_played: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see AttentionSpanEvent for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(contact_id:, media_bridge_id:, media_bridge_object_coordinates:, media_bridge_object_type_id:, media_name:, media_type:, occurred_timestamp:, percent_range:, portal_id:, provider_id:, session_id:, total_percent_played:, external_play_context: nil, media_url: nil, page_id: nil, page_name: nil, page_object_coordinates: nil, page_url: nil, raw_data: nil, total_seconds_played: nil) ⇒ Object
Some parameter documentations has been truncated, see HubSpotSDK::Models::Cms::AttentionSpanEvent for more details.
|
|
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 140
|
Instance Attribute Details
#contact_id ⇒ Integer
The ID of the contact in HubSpot’s system that consumed the media. This can be fetched using HubSpot’s Get contact by usertoken (utk) API. The API also supports supplying a usertoken, and will handle converting this into a contact ID automatically.
15 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 15 required :contact_id, Integer, api_name: :contactId |
#external_play_context ⇒ Symbol, ...
87 88 89 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 87 optional :external_play_context, enum: -> { HubSpotSDK::Cms::AttentionSpanEvent::ExternalPlayContext }, api_name: :externalPlayContext |
#media_bridge_id ⇒ Integer
20 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 20 required :media_bridge_id, Integer, api_name: :mediaBridgeId |
#media_bridge_object_coordinates ⇒ String
25 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 25 required :media_bridge_object_coordinates, String, api_name: :mediaBridgeObjectCoordinates |
#media_bridge_object_type_id ⇒ String
30 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 30 required :media_bridge_object_type_id, String, api_name: :mediaBridgeObjectTypeId |
#media_name ⇒ String
35 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 35 required :media_name, String, api_name: :mediaName |
#media_type ⇒ Symbol, HubSpotSDK::Models::Cms::AttentionSpanEvent::MediaType
40 41 42 43 44 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 40 required :media_type, enum: -> { HubSpotSDK::Cms::AttentionSpanEvent::MediaType }, api_name: :mediaType |
#media_url ⇒ String?
94 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 94 optional :media_url, String, api_name: :mediaUrl |
#occurred_timestamp ⇒ Integer
The timestamp at which this event occurred, in milliseconds since the epoch.
50 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 50 required :occurred_timestamp, Integer, api_name: :occurredTimestamp |
#page_id ⇒ Integer?
The ID of the page, if hosted on HubSpot. Required for HubSpot pages.
100 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 100 optional :page_id, Integer, api_name: :pageId |
#page_name ⇒ String?
The name of the page. Required if the page is not hosted on HubSpot.
106 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 106 optional :page_name, String, api_name: :pageName |
#page_object_coordinates ⇒ String?
111 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 111 optional :page_object_coordinates, String, api_name: :pageObjectCoordinates |
#page_url ⇒ String?
The URL of the page that an event happened on. Required if the page is not hosted on HubSpot.
118 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 118 optional :page_url, String, api_name: :pageUrl |
#percent_range ⇒ String
55 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 55 required :percent_range, String, api_name: :percentRange |
#portal_id ⇒ Integer
The ID of the HubSpot account.
61 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 61 required :portal_id, Integer, api_name: :portalId |
#provider_id ⇒ Integer
66 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 66 required :provider_id, Integer, api_name: :providerId |
#raw_data ⇒ String?
This is the raw data which provides the most granular data about spans of the media, and how many times each span was consumed by the user. For example, for a 10 second video where each second is a span, if a visitor watches the first 5 seconds of the video, then restarts the video and watches the first 2 seconds again, the resulting ‘rawDataString` would be `“0=2;1=2;2=1;3=1;4=1;5=0;6=0;7=0;8=0;9=0;”`.
129 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 129 optional :raw_data, String, api_name: :rawData |
#session_id ⇒ String
71 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 71 required :session_id, String, api_name: :sessionId |
#total_percent_played ⇒ Float
The percent of the media that the user consumed. Providers may calculate this differently depending on how they consider repeated views of the same portion of media. For this reason, the API will not attempt to validate totalPercentWatched against the attention span information for the event. If it is missing, HubSpot will calculate this from the attention span map as follows: (number of spans with a value of 1 or more)/(Total number of spans).
82 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 82 required :total_percent_played, Float, api_name: :totalPercentPlayed |
#total_seconds_played ⇒ Integer?
The seconds that a user spent consuming the media. The media bridge calculates this as ‘totalPercentPlayed`*`mediaDuration`. If a provider would like this to be calculated differently, they can provide the pre-calculated value when they create the event.
138 |
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 138 optional :total_seconds_played, Integer, api_name: :totalSecondsPlayed |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/hubspot_sdk/models/cms/attention_span_event.rb', line 194
|