Class: Google::Apis::AnalyticsreportingV4::Activity
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsreportingV4::Activity
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/analyticsreporting_v4/classes.rb,
generated/google/apis/analyticsreporting_v4/representations.rb,
generated/google/apis/analyticsreporting_v4/representations.rb
Overview
An Activity represents data for an activity of a user. Note that an Activity is different from a hit. A hit might result in multiple Activity's. For example, if a hit includes a transaction and a goal completion, there will be two Activity protos for this hit, one for ECOMMERCE and one for GOAL. Conversely, multiple hits can also construct one Activity. In classic e-commerce, data for one transaction might be sent through multiple hits. These hits will be merged into one ECOMMERCE Activity.
Instance Attribute Summary collapse
-
#activity_time ⇒ String
Timestamp of the activity.
-
#activity_type ⇒ String
Type of this activity.
-
#appview ⇒ Google::Apis::AnalyticsreportingV4::ScreenviewData
This will be set if
activity_type
equalsSCREEN_VIEW
. -
#campaign ⇒ String
For manual campaign tracking, it is the value of the utm_campaign campaign tracking parameter.
-
#channel_grouping ⇒ String
The Channel Group associated with an end user's session for this View (defined by the View's Channel Groupings).
-
#custom_dimension ⇒ Array<Google::Apis::AnalyticsreportingV4::CustomDimension>
A list of all custom dimensions associated with this activity.
-
#ecommerce ⇒ Google::Apis::AnalyticsreportingV4::EcommerceData
E-commerce details associated with the user activity.
-
#event ⇒ Google::Apis::AnalyticsreportingV4::EventData
Represents all the details pertaining to an event.
-
#goals ⇒ Google::Apis::AnalyticsreportingV4::GoalSetData
Represents a set of goals that were reached in an activity.
-
#hostname ⇒ String
The hostname from which the tracking request was made.
-
#keyword ⇒ String
For manual campaign tracking, it is the value of the utm_term campaign tracking parameter.
-
#landing_page_path ⇒ String
The first page in users' sessions, or the landing page.
-
#medium ⇒ String
The type of referrals.
-
#pageview ⇒ Google::Apis::AnalyticsreportingV4::PageviewData
Represents details collected when the visitor views a page.
-
#source ⇒ String
The source of referrals.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Activity
constructor
A new instance of Activity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Activity
Returns a new instance of Activity.
135 136 137 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 135 def initialize(**args) update!(**args) end |
Instance Attribute Details
#activity_time ⇒ String
Timestamp of the activity. If activities for a visit cross midnight and
occur in two separate dates, then two sessions (one per date)
share the session identifier.
For example, say session ID 113472 has activity within 2019-08-20, and
session ID 243742 has activity within 2019-08-25 and 2019-08-26. Session ID
113472 is one session, and session ID 243742 is two sessions.
Corresponds to the JSON property activityTime
44 45 46 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 44 def activity_time @activity_time end |
#activity_type ⇒ String
Type of this activity.
Corresponds to the JSON property activityType
49 50 51 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 49 def activity_type @activity_type end |
#appview ⇒ Google::Apis::AnalyticsreportingV4::ScreenviewData
This will be set if activity_type
equals SCREEN_VIEW
.
Corresponds to the JSON property appview
54 55 56 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 54 def appview @appview end |
#campaign ⇒ String
For manual campaign tracking, it is the value of the utm_campaign campaign
tracking parameter. For AdWords autotagging, it is the name(s) of the
online ad campaign(s) you use for the property. If you use neither, its
value is (not set).
Corresponds to the JSON property campaign
62 63 64 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 62 def campaign @campaign end |
#channel_grouping ⇒ String
The Channel Group associated with an end user's session for this View
(defined by the View's Channel Groupings).
Corresponds to the JSON property channelGrouping
68 69 70 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 68 def channel_grouping @channel_grouping end |
#custom_dimension ⇒ Array<Google::Apis::AnalyticsreportingV4::CustomDimension>
A list of all custom dimensions associated with this activity.
Corresponds to the JSON property customDimension
73 74 75 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 73 def custom_dimension @custom_dimension end |
#ecommerce ⇒ Google::Apis::AnalyticsreportingV4::EcommerceData
E-commerce details associated with the user activity.
Corresponds to the JSON property ecommerce
78 79 80 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 78 def ecommerce @ecommerce end |
#event ⇒ Google::Apis::AnalyticsreportingV4::EventData
Represents all the details pertaining to an event.
Corresponds to the JSON property event
83 84 85 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 83 def event @event end |
#goals ⇒ Google::Apis::AnalyticsreportingV4::GoalSetData
Represents a set of goals that were reached in an activity.
Corresponds to the JSON property goals
88 89 90 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 88 def goals @goals end |
#hostname ⇒ String
The hostname from which the tracking request was made.
Corresponds to the JSON property hostname
93 94 95 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 93 def hostname @hostname end |
#keyword ⇒ String
For manual campaign tracking, it is the value of the utm_term campaign
tracking parameter. For AdWords traffic, it contains the best matching
targeting criteria. For the display network, where multiple targeting
criteria could have caused the ad to show up, it returns the best matching
targeting criteria as selected by Ads. This could be display_keyword, site
placement, boomuserlist, user_interest, age, or gender. Otherwise its value
is (not set).
Corresponds to the JSON property keyword
104 105 106 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 104 def keyword @keyword end |
#landing_page_path ⇒ String
The first page in users' sessions, or the landing page.
Corresponds to the JSON property landingPagePath
109 110 111 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 109 def landing_page_path @landing_page_path end |
#medium ⇒ String
The type of referrals. For manual campaign tracking, it is the value of the
utm_medium campaign tracking parameter. For AdWords autotagging, it is cpc.
If users came from a search engine detected by Google Analytics, it is
organic. If the referrer is not a search engine, it is referral. If users
came directly to the property and document.referrer is empty, its value is
(none).
Corresponds to the JSON property medium
119 120 121 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 119 def medium @medium end |
#pageview ⇒ Google::Apis::AnalyticsreportingV4::PageviewData
Represents details collected when the visitor views a page.
Corresponds to the JSON property pageview
124 125 126 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 124 def pageview @pageview end |
#source ⇒ String
The source of referrals. For manual campaign tracking, it is the value of
the utm_source campaign tracking parameter. For AdWords autotagging, it is
google. If you use neither, it is the domain of the source
(e.g., document.referrer) referring the users. It may also contain a port
address. If users arrived without a referrer, its value is (direct).
Corresponds to the JSON property source
133 134 135 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 133 def source @source end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 140 def update!(**args) @activity_time = args[:activity_time] if args.key?(:activity_time) @activity_type = args[:activity_type] if args.key?(:activity_type) @appview = args[:appview] if args.key?(:appview) @campaign = args[:campaign] if args.key?(:campaign) @channel_grouping = args[:channel_grouping] if args.key?(:channel_grouping) @custom_dimension = args[:custom_dimension] if args.key?(:custom_dimension) @ecommerce = args[:ecommerce] if args.key?(:ecommerce) @event = args[:event] if args.key?(:event) @goals = args[:goals] if args.key?(:goals) @hostname = args[:hostname] if args.key?(:hostname) @keyword = args[:keyword] if args.key?(:keyword) @landing_page_path = args[:landing_page_path] if args.key?(:landing_page_path) @medium = args[:medium] if args.key?(:medium) @pageview = args[:pageview] if args.key?(:pageview) @source = args[:source] if args.key?(:source) end |