You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
275 lines
14 KiB
275 lines
14 KiB
<html><body>
|
|
<style>
|
|
|
|
body, h1, h2, h3, div, span, p, pre, a {
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
font-weight: inherit;
|
|
font-style: inherit;
|
|
font-size: 100%;
|
|
font-family: inherit;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
body {
|
|
font-size: 13px;
|
|
padding: 1em;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 26px;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 24px;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 20px;
|
|
margin-bottom: 1em;
|
|
margin-top: 1em;
|
|
}
|
|
|
|
pre, code {
|
|
line-height: 1.5;
|
|
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
|
|
}
|
|
|
|
pre {
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
h1, h2, h3, p {
|
|
font-family: Arial, sans serif;
|
|
}
|
|
|
|
h1, h2, h3 {
|
|
border-bottom: solid #CCC 1px;
|
|
}
|
|
|
|
.toc_element {
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
.firstline {
|
|
margin-left: 2 em;
|
|
}
|
|
|
|
.method {
|
|
margin-top: 1em;
|
|
border: solid 1px #CCC;
|
|
padding: 1em;
|
|
background: #EEE;
|
|
}
|
|
|
|
.details {
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<h1><a href="analyticsreporting_v4.html">Analytics Reporting API</a> . <a href="analyticsreporting_v4.userActivity.html">userActivity</a></h1>
|
|
<h2>Instance Methods</h2>
|
|
<p class="toc_element">
|
|
<code><a href="#search">search(body, x__xgafv=None)</a></code></p>
|
|
<p class="firstline">Returns User Activity data.</p>
|
|
<p class="toc_element">
|
|
<code><a href="#search_next">search_next(previous_request, previous_response)</a></code></p>
|
|
<p class="firstline">Retrieves the next page of results.</p>
|
|
<h3>Method Details</h3>
|
|
<div class="method">
|
|
<code class="details" id="search">search(body, x__xgafv=None)</code>
|
|
<pre>Returns User Activity data.
|
|
|
|
Args:
|
|
body: object, The request body. (required)
|
|
The object takes the form of:
|
|
|
|
{ # The request to fetch User Report from Reporting API `userActivity:get` call.
|
|
"pageSize": 42, # Page size is for paging and specifies the maximum number of returned rows.
|
|
# Page size should be > 0. If the value is 0 or if the field isn't specified,
|
|
# the request returns the default of 1000 rows per page.
|
|
"dateRange": { # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. # Date range for which to retrieve the user activity. If a date range is not
|
|
# provided, the default date range is (startDate: current date - 7 days,
|
|
# endDate: current date - 1 day).
|
|
# The start and end dates are specified in
|
|
# [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
|
|
"startDate": "A String", # The start date for the query in the format `YYYY-MM-DD`.
|
|
"endDate": "A String", # The end date for the query in the format `YYYY-MM-DD`.
|
|
},
|
|
"activityTypes": [ # Set of all activity types being requested. Only acvities matching these
|
|
# types will be returned in the response. If empty, all activies will be
|
|
# returned.
|
|
"A String",
|
|
],
|
|
"pageToken": "A String", # A continuation token to get the next page of the results. Adding this to
|
|
# the request will return the rows after the pageToken. The pageToken should
|
|
# be the value returned in the nextPageToken parameter in the response to
|
|
# the [SearchUserActivityRequest](#SearchUserActivityRequest) request.
|
|
"user": { # Contains information to identify a particular user uniquely. # Required. Unique user Id to query for. Every
|
|
# [SearchUserActivityRequest](#SearchUserActivityRequest) must contain this
|
|
# field.
|
|
"type": "A String", # Type of the user in the request. The field `userId` is associated with this
|
|
# type.
|
|
"userId": "A String", # Unique Id of the user for which the data is being requested.
|
|
},
|
|
"viewId": "A String", # Required. The Analytics
|
|
# [view ID](https://support.google.com/analytics/answer/1009618)
|
|
# from which to retrieve data. Every
|
|
# [SearchUserActivityRequest](#SearchUserActivityRequest) must contain the
|
|
# `viewId`.
|
|
}
|
|
|
|
x__xgafv: string, V1 error format.
|
|
Allowed values
|
|
1 - v1 error format
|
|
2 - v2 error format
|
|
|
|
Returns:
|
|
An object of the form:
|
|
|
|
{ # The response from `userActivity:get` call.
|
|
"nextPageToken": "A String", # This token should be passed to
|
|
# [SearchUserActivityRequest](#SearchUserActivityRequest) to retrieve the
|
|
# next page.
|
|
"sampleRate": 3.14, # This field represents the
|
|
# [sampling rate](https://support.google.com/analytics/answer/2637192) for
|
|
# the given request and is a number between 0.0 to 1.0. See
|
|
# [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
|
|
# for details.
|
|
"totalRows": 42, # Total rows returned by this query (across different pages).
|
|
"sessions": [ # Each record represents a session (device details, duration, etc).
|
|
{ # This represents a user session performed on a specific device at a certain
|
|
# time over a period of time.
|
|
"activities": [ # Represents a detailed view into each of the activity in this session.
|
|
{ # 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.
|
|
"customDimension": [ # A list of all custom dimensions associated with this activity.
|
|
{ # Custom dimension.
|
|
"index": 42, # Slot number of custom dimension.
|
|
"value": "A String", # Value of the custom dimension. Default value (i.e. empty string) indicates
|
|
# clearing sesion/visitor scope custom dimension value.
|
|
},
|
|
],
|
|
"landingPagePath": "A String", # The first page in users' sessions, or the landing page.
|
|
"hostname": "A String", # The hostname from which the tracking request was made.
|
|
"ecommerce": { # E-commerce details associated with the user activity. # This will be set if `activity_type` equals `ECOMMERCE`.
|
|
"ecommerceType": "A String", # The type of this e-commerce activity.
|
|
"transaction": { # Represents details collected when the visitor performs a transaction on the # Transaction details of this e-commerce action.
|
|
# page.
|
|
"transactionTax": 3.14, # Total tax for the transaction.
|
|
"transactionId": "A String", # The transaction ID, supplied by the e-commerce tracking method, for the
|
|
# purchase in the shopping cart.
|
|
"transactionShipping": 3.14, # Total cost of shipping.
|
|
"transactionRevenue": 3.14, # The total sale revenue (excluding shipping and tax) of the transaction.
|
|
},
|
|
"actionType": "A String", # Action associated with this e-commerce action.
|
|
"products": [ # Details of the products in this transaction.
|
|
{ # Details of the products in an e-commerce transaction.
|
|
"productSku": "A String", # Unique code that represents the product.
|
|
"itemRevenue": 3.14, # The total revenue from purchased product items.
|
|
"productQuantity": "A String", # Total number of this product units in the transaction.
|
|
"productName": "A String", # The product name, supplied by the e-commerce tracking application, for
|
|
# the purchased items.
|
|
},
|
|
],
|
|
},
|
|
"keyword": "A 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).
|
|
"campaign": "A 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).
|
|
"activityType": "A String", # Type of this activity.
|
|
"pageview": { # Represents details collected when the visitor views a page. # This will be set if `activity_type` equals `PAGEVIEW`. This field
|
|
# contains all the details about the visitor and the page that was visited.
|
|
"pageTitle": "A String", # The title of the page that the visitor viewed.
|
|
"pagePath": "A String", # The URL of the page that the visitor viewed.
|
|
},
|
|
"appview": { # This will be set if `activity_type` equals `SCREEN_VIEW`.
|
|
"mobileDeviceBranding": "A String", # Mobile manufacturer or branded name. Eg: "Google", "Apple" etc.
|
|
"mobileDeviceModel": "A String", # Mobile device model. Eg: "Pixel", "iPhone" etc.
|
|
"appName": "A String", # The application name.
|
|
"screenName": "A String", # The name of the screen.
|
|
},
|
|
"source": "A 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).
|
|
"medium": "A 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).
|
|
"channelGrouping": "A String", # The Channel Group associated with an end user's session for this View
|
|
# (defined by the View's Channel Groupings).
|
|
"activityTime": "A String", # Timestamp of the activity.
|
|
"event": { # Represents all the details pertaining to an event. # This field contains all the details pertaining to an event and will be
|
|
# set if `activity_type` equals `EVENT`.
|
|
"eventLabel": "A String", # Label attached with the event.
|
|
"eventValue": "A String", # Numeric value associated with the event.
|
|
"eventAction": "A String", # Type of interaction with the object. Eg: 'play'.
|
|
"eventCategory": "A String", # The object on the page that was interacted with. Eg: 'Video'.
|
|
"eventCount": "A String", # Number of such events in this activity.
|
|
},
|
|
"goals": { # Represents a set of goals that were reached in an activity. # This field contains a list of all the goals that were reached in this
|
|
# activity when `activity_type` equals `GOAL`.
|
|
"goals": [ # All the goals that were reached in the current activity.
|
|
{ # Represents all the details pertaining to a goal.
|
|
"goalCompletions": "A String", # Total number of goal completions in this activity.
|
|
"goalValue": 3.14, # Value in this goal.
|
|
"goalName": "A String", # Name of the goal.
|
|
"goalPreviousStep1": "A String", # URL of the page one step prior to the goal completion.
|
|
"goalPreviousStep3": "A String", # URL of the page three steps prior to the goal completion.
|
|
"goalPreviousStep2": "A String", # URL of the page two steps prior to the goal completion.
|
|
"goalIndex": 42, # This identifies the goal as configured for the profile.
|
|
"goalCompletionLocation": "A String", # URL of the page where this goal was completed.
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
"sessionDate": "A String", # Date of this session in ISO-8601 format.
|
|
"deviceCategory": "A String", # The type of device used: "mobile", "tablet" etc.
|
|
"platform": "A String", # Platform on which the activity happened: "android", "ios" etc.
|
|
"sessionId": "A String", # Unique ID of the session.
|
|
"dataSource": "A String", # The data source of a hit. By default, hits sent from analytics.js are
|
|
# reported as "web" and hits sent from the mobile SDKs are reported as "app".
|
|
# These values can be overridden in the Measurement Protocol.
|
|
},
|
|
],
|
|
}</pre>
|
|
</div>
|
|
|
|
<div class="method">
|
|
<code class="details" id="search_next">search_next(previous_request, previous_response)</code>
|
|
<pre>Retrieves the next page of results.
|
|
|
|
Args:
|
|
previous_request: The request for the previous page. (required)
|
|
previous_response: The response from the request for the previous page. (required)
|
|
|
|
Returns:
|
|
A request object that you can call 'execute()' on to request the next
|
|
page. Returns None if there are no more items in the collection.
|
|
</pre>
|
|
</div>
|
|
|
|
</body></html> |