blob: 71ea750b603657e74c05c7175385a7ec1e39ce5d [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.data.html">data</a> . <a href="analytics_v3.data.realtime.html">realtime</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080081 <code><a href="#get">get(ids, metrics, max_results=None, filters=None, sort=None, dimensions=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040082<p class="firstline">Returns real time data for a view (profile).</p>
83<h3>Method Details</h3>
84<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085 <code class="details" id="close">close()</code>
86 <pre>Close httplib2 connections.</pre>
87</div>
88
89<div class="method">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080090 <code class="details" id="get">get(ids, metrics, max_results=None, filters=None, sort=None, dimensions=None)</code>
John Asmuth614db982014-04-24 15:46:26 -040091 <pre>Returns real time data for a view (profile).
92
93Args:
94 ids: string, Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -070095 metrics: string, A comma-separated list of real time metrics. E.g., &#x27;rt:activeUsers&#x27;. At least one metric must be specified. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080096 max_results: integer, The maximum number of entries to include in this feed.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080097 filters: string, A comma-separated list of dimension or metric filters to be applied to real time data.
98 sort: string, A comma-separated list of dimensions or metrics that determine the sort order for real time data.
99 dimensions: string, A comma-separated list of real time dimensions. E.g., &#x27;rt:medium,rt:city&#x27;.
John Asmuth614db982014-04-24 15:46:26 -0400100
101Returns:
102 An object of the form:
103
104 { # Real time data for a given view (profile).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800105 &quot;kind&quot;: &quot;analytics#realtimeData&quot;, # Resource type.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800106 &quot;totalsForAllResults&quot;: { # Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request.
107 &quot;a_key&quot;: &quot;A String&quot;, # Key-value pair for the total value of a metric. Key is the metric name and the value is the total value for that metric.
108 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800109 &quot;query&quot;: { # Real time data request query parameters.
110 &quot;sort&quot;: [ # List of dimensions or metrics based on which real time data is sorted.
111 &quot;A String&quot;,
112 ],
113 &quot;ids&quot;: &quot;A String&quot;, # Unique table ID.
114 &quot;filters&quot;: &quot;A String&quot;, # Comma-separated list of dimension or metric filters.
115 &quot;max-results&quot;: 42, # Maximum results per page.
116 &quot;metrics&quot;: [ # List of real time metrics.
117 &quot;A String&quot;,
118 ],
119 &quot;dimensions&quot;: &quot;A String&quot;, # List of real time dimensions.
120 },
121 &quot;selfLink&quot;: &quot;A String&quot;, # Link to this page.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800122 &quot;columnHeaders&quot;: [ # Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request.
123 {
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800124 &quot;columnType&quot;: &quot;A String&quot;, # Column Type. Either DIMENSION or METRIC.
125 &quot;dataType&quot;: &quot;A String&quot;, # Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800126 &quot;name&quot;: &quot;A String&quot;, # Column name.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800127 },
128 ],
129 &quot;profileInfo&quot;: { # Information for the view (profile), for which the real time data was requested.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800130 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web Property ID to which this view (profile) belongs.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800131 &quot;tableId&quot;: &quot;A String&quot;, # Table ID for view (profile).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800132 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID.
133 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this view (profile) belongs.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800134 &quot;profileName&quot;: &quot;A String&quot;, # View (Profile) name.
135 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this view (profile) belongs.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700136 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800137 &quot;totalResults&quot;: 42, # The total number of rows for the query, regardless of the number of rows in the response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 &quot;rows&quot;: [ # Real time data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request.
139 [
140 &quot;A String&quot;,
141 ],
142 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800143 &quot;id&quot;: &quot;A String&quot;, # Unique ID for this data response.
John Asmuth614db982014-04-24 15:46:26 -0400144 }</pre>
145</div>
146
147</body></html>